BLI: float4x4: Add == and != operators

This commit is contained in:
Clément Foucault 2022-05-18 21:28:56 +02:00
parent c4c6ea7ea9
commit fe4ae77ded
1 changed files with 10 additions and 0 deletions

View File

@ -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]);