cfloats are just floats, no overcomplication

This commit is contained in:
Dane Johnson committed 2021-01-27 16:17:22 -06:00
1 parent 28c4088bdc
commit b5ba73825e
18 files changed
+48 -52

No files matched your search

+3 -6
View File
@@ -20,21 +20,18 @@
#include "CollisionShape.h"
%}
typedef float cfloat;
%ignore "cfloat";
class Vector3 {
public:
Vector3();
Vector3(cfloat x, cfloat y, cfloat z);
cfloat x, y, z;
Vector3(float x, float y, float z);
float x, y, z;
};
%extend Vector3 {
Vector3 operator+(const Vector3 &o) const {
return *$self + o;
}
Vector3 operator*(const cfloat &o) const {
Vector3 operator*(const float &o) const {
return *$self * o;
}
}