More jstudio work (#2048)

This commit is contained in:
hatal175
2024-01-26 00:50:55 +02:00
committed by GitHub
parent 4640b758c9
commit 1ea10fcc63
80 changed files with 834 additions and 2229 deletions
+31
View File
@@ -19,6 +19,28 @@ struct TVec3 {
}
};
template <>
struct TVec3<double> {
double x, y, z;
void set(double x_, double y_, double z_) {
x = x_;
y = y_;
z = z_;
}
inline TVec3<double>& operator*=(double b) {
scale(b);
return *this;
}
void scale(double b) {
x *= b;
y *= b;
z *= b;
}
};
template <>
struct TVec3<s16> {
s16 x, y, z;
@@ -422,6 +444,15 @@ struct TUtil {
}
};
template<>
struct TUtil<double> {
static inline double epsilon() { return 32.0f * FLT_EPSILON; }
static inline double one() { return 1.0; }
static inline double atan2(double x, double y) { return atan2(x, y); }
static inline double asin(double x) { return asin(x); }
static inline double halfPI() { return 1.5707963267948966; }
};
// clang-format on
} // namespace JGeometry