Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-05-18 22:28:56 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-05-19 00:01:08 +0300
commitfe4ae77deda916b37ee5b48b2c5b4e3e220f664e (patch)
treedcbf4d6c80728ce4c14a7a8db26c96539e079177 /source/blender/blenlib
parentc4c6ea7ea9f151ef79a13ae933029b1c6060eb69 (diff)
BLI: float4x4: Add == and != operators
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_float4x4.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_float4x4.hh b/source/blender/blenlib/BLI_float4x4.hh
index 1ed4d2f1ae1..64e6e68432f 100644
--- a/source/blender/blenlib/BLI_float4x4.hh
+++ b/source/blender/blenlib/BLI_float4x4.hh
@@ -147,6 +147,16 @@ struct float4x4 {
return m * float3(v);
}
+ friend bool operator==(const float4x4 &a, const float4x4 &b)
+ {
+ return equals_m4m4(a.ptr(), b.ptr());
+ }
+
+ friend bool operator!=(const float4x4 &a, const float4x4 &b)
+ {
+ return !(a == b);
+ }
+
float3 translation() const
{
return float3(values[3]);