diff options
Diffstat (limited to 'source/blender/blenlib/BLI_float2.hh')
-rw-r--r-- | source/blender/blenlib/BLI_float2.hh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_float2.hh b/source/blender/blenlib/BLI_float2.hh index 84dd0e358a2..cf6e00ba938 100644 --- a/source/blender/blenlib/BLI_float2.hh +++ b/source/blender/blenlib/BLI_float2.hh @@ -65,6 +65,11 @@ struct float2 { return len_squared_v2(*this); } + bool is_zero() const + { + return this->x == 0.0f && this->y == 0.0f; + } + float2 &operator+=(const float2 &other) { x += other.x; |