Commit: 543783fc619b19411d79fe39c49f6d310a86ff09
Author: Hans Goudey
Date:   Mon Mar 8 21:34:18 2021 -0500
Branches: geometry-nodes-mesh-primitives
https://developer.blender.org/rB543783fc619b19411d79fe39c49f6d310a86ff09

Add float3.is_zero()

===================================================================

M       source/blender/blenlib/BLI_float3.hh

===================================================================

diff --git a/source/blender/blenlib/BLI_float3.hh 
b/source/blender/blenlib/BLI_float3.hh
index 9a8870963bf..7e49cc89b52 100644
--- a/source/blender/blenlib/BLI_float3.hh
+++ b/source/blender/blenlib/BLI_float3.hh
@@ -174,6 +174,11 @@ struct float3 {
     return len_squared_v3(*this);
   }
 
+  bool is_zero() const
+  {
+    return this->x == 0.0f && this->y == 0.0f && this->z == 0.0f;
+  }
+
   void reflect(const float3 &normal)
   {
     *this = this->reflected(normal);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to