[Bf-blender-cvs] [350bc04f56c] functions: move float3 -> float2 conversion to different file
Jacques Lucke
noreply at git.blender.org
Thu Feb 13 18:58:48 CET 2020
Commit: 350bc04f56c9a5d3d35d5e11ff53a61065cd6739
Author: Jacques Lucke
Date: Thu Feb 13 17:55:15 2020 +0100
Branches: functions
https://developer.blender.org/rB350bc04f56c9a5d3d35d5e11ff53a61065cd6739
move float3 -> float2 conversion to different file
===================================================================
M source/blender/blenlib/BLI_float2.h
M source/blender/blenlib/BLI_math_cxx.h
===================================================================
diff --git a/source/blender/blenlib/BLI_float2.h b/source/blender/blenlib/BLI_float2.h
index eb2890fce87..fb2bdf77c16 100644
--- a/source/blender/blenlib/BLI_float2.h
+++ b/source/blender/blenlib/BLI_float2.h
@@ -1,6 +1,8 @@
#ifndef __BLI_FLOAT2_H__
#define __BLI_FLOAT2_H__
+#include "BLI_float3.h"
+
namespace BLI {
struct float2 {
@@ -16,7 +18,9 @@ struct float2 {
{
}
- float2(float3 other);
+ float2(float3 other) : x(other.x), y(other.y)
+ {
+ }
operator float *()
{
diff --git a/source/blender/blenlib/BLI_math_cxx.h b/source/blender/blenlib/BLI_math_cxx.h
index ced75708c18..e1dad172dfe 100644
--- a/source/blender/blenlib/BLI_math_cxx.h
+++ b/source/blender/blenlib/BLI_math_cxx.h
@@ -95,11 +95,4 @@ struct rgba_b {
}
};
-/* Conversions
- *****************************************/
-
-inline float2::float2(float3 other) : x(other.x), y(other.y)
-{
-}
-
} // namespace BLI
More information about the Bf-blender-cvs
mailing list