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:
Diffstat (limited to 'source/blender/blenlib/BLI_float3.hh')
-rw-r--r--source/blender/blenlib/BLI_float3.hh5
1 files changed, 5 insertions, 0 deletions
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);