[Bf-blender-cvs] [2e1ba1c02af] functions: interpolate vectors
Jacques Lucke
noreply at git.blender.org
Mon Jul 15 18:12:26 CEST 2019
Commit: 2e1ba1c02af04212e8aeb9b345c6d6325389c549
Author: Jacques Lucke
Date: Mon Jul 15 14:37:37 2019 +0200
Branches: functions
https://developer.blender.org/rB2e1ba1c02af04212e8aeb9b345c6d6325389c549
interpolate vectors
===================================================================
M source/blender/blenlib/BLI_math.hpp
===================================================================
diff --git a/source/blender/blenlib/BLI_math.hpp b/source/blender/blenlib/BLI_math.hpp
index 41d09dff541..acab14b5680 100644
--- a/source/blender/blenlib/BLI_math.hpp
+++ b/source/blender/blenlib/BLI_math.hpp
@@ -156,6 +156,11 @@ struct float3 {
{
return (a - b).length();
}
+
+ static float3 interpolate(float3 a, float3 b, float t)
+ {
+ return a * (1 - t) + b * t;
+ }
};
struct float4x4 {
More information about the Bf-blender-cvs
mailing list