diff options
author | Omar Emara <mail@OmarEmara.dev> | 2022-09-09 14:15:01 +0300 |
---|---|---|
committer | Omar Emara <mail@OmarEmara.dev> | 2022-09-09 14:15:01 +0300 |
commit | ac66a819c14265ee3e0f48e4cb54b6c10b7fb064 (patch) | |
tree | 327467ab316792461f11ecf242a58466596dfccc /source/blender/blenlib/tests | |
parent | 77a4bb02cc99bfd581c6bb9e35ca3fe53389915e (diff) |
Realtime Compositor: Implement pixelate node
This patch implements the pixelate node for the realtime compositor.
Differential Revision: https://developer.blender.org/D15662
Reviewed By: Clement Foucault
Diffstat (limited to 'source/blender/blenlib/tests')
-rw-r--r-- | source/blender/blenlib/tests/BLI_float3x3_test.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenlib/tests/BLI_float3x3_test.cc b/source/blender/blenlib/tests/BLI_float3x3_test.cc index d22993ee69e..cd823b6e368 100644 --- a/source/blender/blenlib/tests/BLI_float3x3_test.cc +++ b/source/blender/blenlib/tests/BLI_float3x3_test.cc @@ -34,6 +34,15 @@ TEST(float3x3, Rotation) EXPECT_FLOAT_EQ(result[1], 1.0f); } +TEST(float3x3, Scale) +{ + float2 point(1.0f, 2.0f); + float3x3 transformation = float3x3::from_scale(float2(2.0f, 3.0f)); + float2 result = transformation * point; + EXPECT_FLOAT_EQ(result[0], 2.0f); + EXPECT_FLOAT_EQ(result[1], 6.0f); +} + TEST(float3x3, TranslationRotationScale) { float2 point(1.0f, 2.0f); @@ -116,4 +125,11 @@ TEST(float3x3, Origin) EXPECT_FLOAT_EQ(result[1], 3.0f); } +TEST(float3x3, GetScale2D) +{ + float2 scale(2.0f, 3.0f); + float3x3 transformation = float3x3::from_scale(scale); + EXPECT_EQ(scale, transformation.scale_2d()); +} + } // namespace blender::tests |