35 static inline f32 PI() {
return 3.1415927f; }
48 static inline double one() {
return 1.0; }
51 static inline double halfPI() {
return 1.5707963267948966; }
101 *((
s32*)
this) = *((
s32*)&b);
155 operator const Vec*()
const {
return (
Vec*)&
x; }
182 register f32* dst = &
x;
274 register f32* dst = &
x;
290 register f32* dst = &
x;
322 negateInternal(
this);
502 if (!this->isValid()) {
504 this->
i.setMin(box.
i);
505 this->
i.setMin(box.
f);
506 this->
f.setMax(box.
i);
507 this->
f.setMax(box.
f);
static SECTION_SDATA2 f32 zero[1+1]
Definition JMATrigonometric.cpp:28
void JMAVECScaleAdd(register const Vec *vec1, register const Vec *vec2, register Vec *dst, register f32 scale)
Definition JMath.cpp:84
T cLib_calcTimer(T *value)
Definition c_lib.h:74
static u8 sc[12]
Definition d_a_e_bi.cpp:1110
static u8 pos[12]
Definition d_a_obj_kago.cpp:839
double x double x
Definition e_atan2.c:58
double x double y
Definition e_atan2.c:58
double y1
Definition e_pow.c:163
double v
Definition e_pow.c:163
static u8 max[12]
Definition f_op_actor_mng.cpp:1785
static u8 min[12]
Definition f_op_actor_mng.cpp:1773
static const double T[]
Definition k_tan.c:106
void setTVec3f(const f32 *vec_a, f32 *vec_b)
Definition JGeometry.h:113
float fsqrt_step(float mag)
Definition JGeometry.h:133
Definition JGeometry.h:496
void set(const TVec2< f32 > &i, const TVec2< f32 > &f)
Definition JGeometry.h:512
TBox2(f32 x0, f32 y0, f32 x1, f32 y1)
Definition JGeometry.h:499
void set(f32 x0, f32 y0, f32 x1, f32 y1)
Definition JGeometry.h:513
TBox2()
Definition JGeometry.h:497
TBox2(const TVec2< f32 > &i, const TVec2< f32 > &f)
Definition JGeometry.h:498
void set(const TBox2 &other)
Definition JGeometry.h:511
void absolute()
Definition JGeometry.h:501
TVec2< f32 > f
Definition JGeometry.h:492
void addPos(const TVec2< f32 > &pos)
Definition JGeometry.h:481
bool intersect(const TBox< TVec2< f32 > > &other)
Definition JGeometry.h:486
f32 getHeight() const
Definition JGeometry.h:473
bool isValid() const
Definition JGeometry.h:475
f32 getWidth() const
Definition JGeometry.h:472
void addPos(f32 x, f32 y)
Definition JGeometry.h:477
Definition JGeometry.h:463
TBox(const TBox &other)
Definition JGeometry.h:465
TBox()
Definition JGeometry.h:464
T i
Definition JGeometry.h:467
T f
Definition JGeometry.h:467
static double one()
Definition JGeometry.h:48
static double halfPI()
Definition JGeometry.h:51
static double epsilon()
Definition JGeometry.h:47
static double atan2(double x, double y)
Definition JGeometry.h:49
static double asin(double x)
Definition JGeometry.h:50
static f32 inv_sqrt(f32 x)
Definition JGeometry.h:36
static f32 clamp(f32 v, f32 min, f32 max)
Definition JGeometry.h:25
static f32 PI()
Definition JGeometry.h:35
static f32 epsilon()
Definition JGeometry.h:34
Definition JGeometry.h:11
static T clamp(T v, T min, T max)
Definition JGeometry.h:12
Definition JGeometry.h:401
bool isAbove(const TVec2< T > &other) const
Definition JGeometry.h:437
void setMax(const TVec2< f32 > &max)
Definition JGeometry.h:425
void add(const TVec2< T > &other)
Definition JGeometry.h:432
void set(T v)
Definition JGeometry.h:406
TVec2()
Definition JGeometry.h:402
f32 squared()
Definition JGeometry.h:445
void setMin(const TVec2< f32 > &min)
Definition JGeometry.h:418
TVec2(T v)
Definition JGeometry.h:403
T x
Definition JGeometry.h:458
T y
Definition JGeometry.h:459
TVec2(T x, T y)
Definition JGeometry.h:404
f32 dot(const TVec2< T > &other)
Definition JGeometry.h:441
void set(const TVec2 &other)
Definition JGeometry.h:413
f32 length()
Definition JGeometry.h:449
void set(T x, T y)
Definition JGeometry.h:408
void scale(double b)
Definition JGeometry.h:82
void set(double x_, double y_, double z_)
Definition JGeometry.h:71
double x
Definition JGeometry.h:69
TVec3< double > & operator*=(double b)
Definition JGeometry.h:77
void mul(const TVec3< f32 > &a)
Definition JGeometry.h:203
void normalize()
Definition JGeometry.h:238
void scaleAdd(register f32 sc, const TVec3< f32 > &a, const TVec3< f32 > &b)
Definition JGeometry.h:302
f32 squared() const
Definition JGeometry.h:234
void cross(const TVec3< f32 > &a, const TVec3< f32 > &b)
Definition JGeometry.h:337
TVec3< f32 > & operator+=(const TVec3< f32 > &b)
Definition JGeometry.h:217
void mul(const TVec3< f32 > &a, const TVec3< f32 > &b)
Definition JGeometry.h:181
void normalize(const TVec3< f32 > &other)
Definition JGeometry.h:252
TVec3(const TVec3< f32 > &i_vec)
Definition JGeometry.h:144
TVec3()
Definition JGeometry.h:152
void scale(register f32 sc)
Definition JGeometry.h:271
f32 length() const
Definition JGeometry.h:267
void negate()
Definition JGeometry.h:321
TVec3(const Vec &i_vec)
Definition JGeometry.h:140
bool isZero() const
Definition JGeometry.h:333
f32 setLength(const TVec3< f32 > &other, f32 len)
Definition JGeometry.h:355
TVec3< f32 > & operator=(const Vec &b)
Definition JGeometry.h:207
void setLength(f32 len)
Definition JGeometry.h:341
void sub(const TVec3< f32 > &a, const TVec3< f32 > &b)
Definition JGeometry.h:329
void set(const TVec3< f32 > &other)
Definition JGeometry.h:157
void sub(const TVec3< f32 > &b)
Definition JGeometry.h:325
void zero()
Definition JGeometry.h:179
TVec3(f32 x, f32 y, f32 z)
Definition JGeometry.h:148
TVec3< f32 > & operator=(const TVec3< f32 > &b)
Definition JGeometry.h:212
void negateInternal(TVec3< f32 > *dst)
Definition JGeometry.h:306
void cubic(const TVec3< f32 > ¶m_1, const TVec3< f32 > ¶m_2, const TVec3< f32 > ¶m_3, const TVec3< f32 > ¶m_4, f32 param_5)
Definition JGeometry.h:386
TVec3< f32 > operator+(const TVec3< f32 > &b)
Definition JGeometry.h:222
void set(const Vec &other)
Definition JGeometry.h:163
f32 dot(const TVec3< f32 > &other) const
Definition JGeometry.h:366
void scale(register f32 sc, const TVec3< f32 > &other)
Definition JGeometry.h:286
void set(f32 x_, f32 y_, f32 z_)
Definition JGeometry.h:169
void add(const TVec3< f32 > &b)
Definition JGeometry.h:175
TVec3()
Definition JGeometry.h:93
s16 x
Definition JGeometry.h:91
void set(s16 x_, s16 y_, s16 z_)
Definition JGeometry.h:106
TVec3 & operator=(const TVec3 &b)
Definition JGeometry.h:99
TVec3(s16 x, s16 y, s16 z)
Definition JGeometry.h:95
Definition JGeometry.h:55
T x
Definition JGeometry.h:56
void set(const TVec3 &other)
Definition JGeometry.h:60
T z
Definition JGeometry.h:58
T y
Definition JGeometry.h:57
Definition d_a_hozelda.cpp:18
float f32
Definition types.h:22
signed short s16
Definition types.h:5
signed long s32
Definition types.h:6
void C_VECAdd(register const Vec *a, register const Vec *b, register Vec *ab)
Definition vec.h:36
f32 C_VECSquareMag(const Vec *v)
Definition vec.h:72
void C_VECSubtract(register const Vec *a, register const Vec *b, register Vec *ab)
Definition vec.h:54