45#define Juno_Pow2(d) (d*d)
52#define Juno_Pow3(d) (d*d*d)
59#define Juno_Pow4(d) (d*d*d*d)
69 tVec0.
arr[0] += tVec1.
arr[0];
70 tVec0.
arr[1] += tVec1.
arr[1];
83 tVec0.
arr[0] -= tVec1.
arr[0];
84 tVec0.
arr[1] -= tVec1.
arr[1];
96 tVec0.
arr[0] *= dScalar;
97 tVec0.
arr[1] *= dScalar;
107 return tVec0.
arr[0] * tVec1.
arr[0] + tVec0.
arr[1] * tVec1.
arr[1];
117 return tVec0.
arr[0] * tVec1.
arr[1] - tVec0.
arr[1] * tVec1.
arr[0];
135 tVec0.
arr[0] += tVec1.
arr[0];
136 tVec0.
arr[1] += tVec1.
arr[1];
146 tVec0.
arr[0] -= tVec1.
arr[0];
147 tVec0.
arr[1] -= tVec1.
arr[1];
156 tVec0.
arr[0] *= dScalar;
157 tVec0.
arr[1] *= dScalar;
166 return tVec0.
arr[0] * tVec1.
arr[0] + tVec0.
arr[1] * tVec1.
arr[1];
174 return tVec0.
arr[0] * tVec1.
arr[1] - tVec0.
arr[1] * tVec1.
arr[0];
191 tVec0.
arr[0] += tVec1.
arr[0];
192 tVec0.
arr[1] += tVec1.
arr[1];
202 tVec0.
arr[0] -= tVec1.
arr[0];
203 tVec0.
arr[1] -= tVec1.
arr[1];
212 tVec0.
arr[0] *= dScalar;
213 tVec0.
arr[1] *= dScalar;
222 return tVec0.
arr[0] * tVec1.
arr[0] + tVec0.
arr[1] * tVec1.
arr[1];
230 return tVec0.
arr[0] * tVec1.
arr[1] - tVec0.
arr[1] * tVec1.
arr[0];
248 tVec0.
arr[0] += tVec1.
arr[0];
249 tVec0.
arr[1] += tVec1.
arr[1];
250 tVec0.
arr[2] += tVec1.
arr[2];
260 tVec0.
arr[0] -= tVec1.
arr[0];
261 tVec0.
arr[1] -= tVec1.
arr[1];
262 tVec0.
arr[2] -= tVec1.
arr[2];
271 tVec0.
arr[0] *= dScalar;
272 tVec0.
arr[1] *= dScalar;
273 tVec0.
arr[2] *= dScalar;
282 return tVec0.
arr[0] * tVec1.
arr[0] + tVec0.
arr[1] * tVec1.
arr[1] + tVec0.
arr[2] * tVec1.
arr[2];
292 tVec0.
arr[1] * tVec1.
arr[2] - tVec0.
arr[2] * tVec1.
arr[1],
293 tVec0.
arr[2] * tVec1.
arr[0] - tVec0.
arr[0] * tVec1.
arr[2],
294 tVec0.
arr[0] * tVec1.
arr[1] - tVec0.
arr[1] * tVec1.
arr[0]
313 tVec0.
arr[0] += tVec1.
arr[0];
314 tVec0.
arr[1] += tVec1.
arr[1];
315 tVec0.
arr[2] += tVec1.
arr[2];
325 tVec0.
arr[0] -= tVec1.
arr[0];
326 tVec0.
arr[1] -= tVec1.
arr[1];
327 tVec0.
arr[2] -= tVec1.
arr[2];
336 tVec0.
arr[0] *= dScalar;
337 tVec0.
arr[1] *= dScalar;
338 tVec0.
arr[2] *= dScalar;
347 return tVec0.
arr[0] * tVec1.
arr[0] + tVec0.
arr[1] * tVec1.
arr[1] + tVec0.
arr[2] * tVec1.
arr[2];
356 tVec0.
arr[1] * tVec1.
arr[2] - tVec0.
arr[2] * tVec1.
arr[1],
357 tVec0.
arr[2] * tVec1.
arr[0] - tVec0.
arr[0] * tVec1.
arr[2],
358 tVec0.
arr[0] * tVec1.
arr[1] - tVec0.
arr[1] * tVec1.
arr[0]
377 tVec0.
arr[0] += tVec1.
arr[0];
378 tVec0.
arr[1] += tVec1.
arr[1];
379 tVec0.
arr[2] += tVec1.
arr[2];
389 tVec0.
arr[0] -= tVec1.
arr[0];
390 tVec0.
arr[1] -= tVec1.
arr[1];
391 tVec0.
arr[2] -= tVec1.
arr[2];
400 tVec0.
arr[0] *= dScalar;
401 tVec0.
arr[1] *= dScalar;
402 tVec0.
arr[2] *= dScalar;
411 return tVec0.
arr[0] * tVec1.
arr[0] + tVec0.
arr[1] * tVec1.
arr[1] + tVec0.
arr[2] * tVec1.
arr[2];
420 tVec0.
arr[1] * tVec1.
arr[2] - tVec0.
arr[2] * tVec1.
arr[1],
421 tVec0.
arr[2] * tVec1.
arr[0] - tVec0.
arr[0] * tVec1.
arr[2],
422 tVec0.
arr[0] * tVec1.
arr[1] - tVec0.
arr[1] * tVec1.
arr[0]
467 q0.
arr[0] *= dScalar;
468 q0.
arr[1] *= dScalar;
469 q0.
arr[2] *= dScalar;
470 q0.
arr[3] *= dScalar;
static JUNO_VEC2_F64_T Juno_Vec2_F64_Sub(JUNO_VEC2_F64_T tVec0, JUNO_VEC2_F64_T tVec1)
Subtract two 2D vectors (double).
Definition juno_vec.h:81
static JUNO_VEC3_I32_T Juno_Vec3_I32_Cross(JUNO_VEC3_I32_T tVec0, JUNO_VEC3_I32_T tVec1)
3D cross product (int32).
Definition juno_vec.h:417
static float Juno_Vec2_F32_L2Norm2(JUNO_VEC2_F32_T tVec0)
Squared L2 norm of a 2D vector (float).
Definition juno_vec.h:180
static double Juno_Vec3_F64_Dot(JUNO_VEC3_F64_T tVec0, JUNO_VEC3_F64_T tVec1)
Dot product of two 3D vectors (double).
Definition juno_vec.h:280
static JUNO_VEC2_F32_T Juno_Vec2_F32_Mult(JUNO_VEC2_F32_T tVec0, float dScalar)
Scale a 2D vector by a scalar (float).
Definition juno_vec.h:154
static JUNO_VEC2_F64_T Juno_Vec2_F64_Mult(JUNO_VEC2_F64_T tVec0, double dScalar)
Scale a 2D vector by a scalar (double).
Definition juno_vec.h:94
static JUNO_VEC3_I32_T Juno_Vec3_I32_Add(JUNO_VEC3_I32_T tVec0, JUNO_VEC3_I32_T tVec1)
Add two 3D vectors (int32).
Definition juno_vec.h:375
static JUNO_RQUAT_F64_T Juno_RQuat_F64_Recip(JUNO_RQUAT_F64_T q0)
Multiplicative inverse (reciprocal) of a quaternion (double).
Definition juno_vec.h:520
static float Juno_Vec2_F32_Dot(JUNO_VEC2_F32_T tVec0, JUNO_VEC2_F32_T tVec1)
Dot product of two 2D vectors (float).
Definition juno_vec.h:164
static double Juno_Vec2_F64_Cross(JUNO_VEC2_F64_T tVec0, JUNO_VEC2_F64_T tVec1)
2D cross product (double).
Definition juno_vec.h:115
static JUNO_RQUAT_F64_T Juno_RQuat_F64_Add(JUNO_RQUAT_F64_T q0, JUNO_RQUAT_F64_T q1)
Add two real quaternions (double).
Definition juno_vec.h:440
static float Juno_Vec3_F32_L2Norm2(JUNO_VEC3_F32_T tVec0)
Squared L2 norm of a 3D vector (float).
Definition juno_vec.h:366
static double Juno_RQuat_F64_L2Norm2(JUNO_RQUAT_F64_T q0)
Squared L2 norm of a quaternion (double).
Definition juno_vec.h:510
static double Juno_Vec2_F64_L2Norm2(JUNO_VEC2_F64_T tVec0)
Squared L2 norm of a 2D vector (double).
Definition juno_vec.h:124
static float Juno_Vec2_I32_L2Norm2(JUNO_VEC2_I32_T tVec0)
Squared L2 norm of a 2D vector (int32 inputs; float return).
Definition juno_vec.h:237
static float Juno_Vec3_I32_L2Norm2(JUNO_VEC3_I32_T tVec0)
Squared L2 norm of a 3D vector (int32 inputs; float return).
Definition juno_vec.h:430
static JUNO_VEC2_I32_T Juno_Vec2_I32_Sub(JUNO_VEC2_I32_T tVec0, JUNO_VEC2_I32_T tVec1)
Subtract two 2D vectors (int32).
Definition juno_vec.h:200
static JUNO_VEC3_F32_T Juno_Vec3_F32_Add(JUNO_VEC3_F32_T tVec0, JUNO_VEC3_F32_T tVec1)
Add two 3D vectors (float).
Definition juno_vec.h:311
static JUNO_RQUAT_F64_T Juno_RQuat_F64_Sub(JUNO_RQUAT_F64_T q0, JUNO_RQUAT_F64_T q1)
Subtract two real quaternions (double).
Definition juno_vec.h:453
static JUNO_RQUAT_F64_T Juno_RQuat_F64_Conj(JUNO_RQUAT_F64_T q0)
Conjugate of a right-handed real quaternion (double).
Definition juno_vec.h:499
static double Juno_Vec2_F64_Dot(JUNO_VEC2_F64_T tVec0, JUNO_VEC2_F64_T tVec1)
Dot product of two 2D vectors (double).
Definition juno_vec.h:105
static JUNO_VEC3_F32_T Juno_Vec3_F32_Mult(JUNO_VEC3_F32_T tVec0, float dScalar)
Scale a 3D vector by a scalar (float).
Definition juno_vec.h:334
static JUNO_VEC2_F64_T Juno_Vec2_F64_Add(JUNO_VEC2_F64_T tVec0, JUNO_VEC2_F64_T tVec1)
Add two 2D vectors (double).
Definition juno_vec.h:67
static JUNO_VEC3_F64_T Juno_Vec3_F64_Sub(JUNO_VEC3_F64_T tVec0, JUNO_VEC3_F64_T tVec1)
Subtract two 3D vectors (double).
Definition juno_vec.h:258
static JUNO_VEC2_I32_T Juno_Vec2_I32_Mult(JUNO_VEC2_I32_T tVec0, int32_t dScalar)
Scale a 2D vector by a scalar (int32).
Definition juno_vec.h:210
static JUNO_VEC2_F32_T Juno_Vec2_F32_Add(JUNO_VEC2_F32_T tVec0, JUNO_VEC2_F32_T tVec1)
Add two 2D vectors (float).
Definition juno_vec.h:133
static JUNO_RQUAT_F64_T Juno_RQuat_F64_Mult(JUNO_RQUAT_F64_T q0, double dScalar)
Scale a real quaternion by a scalar (double).
Definition juno_vec.h:465
static JUNO_RQUAT_F64_T Juno_RQuat_F64_HamProd(JUNO_RQUAT_F64_T q0, JUNO_RQUAT_F64_T q1)
Hamilton product of two right-handed real quaternions (double).
Definition juno_vec.h:484
static JUNO_VEC2_F32_T Juno_Vec2_F32_Sub(JUNO_VEC2_F32_T tVec0, JUNO_VEC2_F32_T tVec1)
Subtract two 2D vectors (float).
Definition juno_vec.h:144
static float Juno_Vec2_F32_Cross(JUNO_VEC2_F32_T tVec0, JUNO_VEC2_F32_T tVec1)
2D cross product (float); returns pseudoscalar z-component.
Definition juno_vec.h:172
static JUNO_VEC3_I32_T Juno_Vec3_I32_Mult(JUNO_VEC3_I32_T tVec0, int32_t dScalar)
Scale a 3D vector by a scalar (int32).
Definition juno_vec.h:398
static JUNO_VEC3_F32_T Juno_Vec3_F32_Cross(JUNO_VEC3_F32_T tVec0, JUNO_VEC3_F32_T tVec1)
3D cross product (float).
Definition juno_vec.h:353
static int32_t Juno_Vec3_I32_Dot(JUNO_VEC3_I32_T tVec0, JUNO_VEC3_I32_T tVec1)
Dot product of two 3D vectors (int32).
Definition juno_vec.h:409
#define Juno_Pow2(d)
Square of a value.
Definition juno_vec.h:45
static JUNO_VEC2_I32_T Juno_Vec2_I32_Add(JUNO_VEC2_I32_T tVec0, JUNO_VEC2_I32_T tVec1)
Add two 2D vectors (int32).
Definition juno_vec.h:189
static JUNO_VEC3_F32_T Juno_Vec3_F32_Sub(JUNO_VEC3_F32_T tVec0, JUNO_VEC3_F32_T tVec1)
Subtract two 3D vectors (float).
Definition juno_vec.h:323
static JUNO_VEC3_I32_T Juno_Vec3_I32_Sub(JUNO_VEC3_I32_T tVec0, JUNO_VEC3_I32_T tVec1)
Subtract two 3D vectors (int32).
Definition juno_vec.h:387
static JUNO_VEC3_F64_T Juno_Vec3_F64_Mult(JUNO_VEC3_F64_T tVec0, double dScalar)
Scale a 3D vector by a scalar (double).
Definition juno_vec.h:269
static JUNO_VEC3_F64_T Juno_Vec3_F64_Cross(JUNO_VEC3_F64_T tVec0, JUNO_VEC3_F64_T tVec1)
3D cross product (double).
Definition juno_vec.h:289
static int32_t Juno_Vec2_I32_Dot(JUNO_VEC2_I32_T tVec0, JUNO_VEC2_I32_T tVec1)
Dot product of two 2D vectors (int32).
Definition juno_vec.h:220
static JUNO_VEC3_F64_T Juno_Vec3_F64_Add(JUNO_VEC3_F64_T tVec0, JUNO_VEC3_F64_T tVec1)
Add two 3D vectors (double).
Definition juno_vec.h:246
static float Juno_Vec3_F32_Dot(JUNO_VEC3_F32_T tVec0, JUNO_VEC3_F32_T tVec1)
Dot product of two 3D vectors (float).
Definition juno_vec.h:345
static int32_t Juno_Vec2_I32_Cross(JUNO_VEC2_I32_T tVec0, JUNO_VEC2_I32_T tVec1)
2D cross product (int32); returns pseudoscalar z-component.
Definition juno_vec.h:228
static double Juno_Vec3_F64_L2Norm2(JUNO_VEC3_F64_T tVec0)
Squared L2 norm of a 3D vector (double).
Definition juno_vec.h:302
Vector, matrix, and quaternion types and common result aliases.
Right-handed quaternion (double precision).
Definition juno_vec_types.h:674
double arr[4]
Definition juno_vec_types.h:681
double k
Definition juno_vec_types.h:679
struct JUNO_RQUAT_F64_TAG::@0 tQuat
double j
Definition juno_vec_types.h:678
double s
Definition juno_vec_types.h:676
double i
Definition juno_vec_types.h:677
2D vector union supporting Cartesian, polar, and array access (float32 precision).
Definition juno_vec_types.h:148
float arr[2]
Definition juno_vec_types.h:151
2D vector union supporting Cartesian, polar, and array access (double precision).
Definition juno_vec_types.h:91
double arr[2]
Definition juno_vec_types.h:94
2D vector union supporting Cartesian, polar, and array access (32-bit integer).
Definition juno_vec_types.h:205
int32_t arr[2]
Definition juno_vec_types.h:208
3D vector union supporting Cartesian, spherical, and array access (float32 precision).
Definition juno_vec_types.h:323
float arr[3]
Definition juno_vec_types.h:326
3D vector union supporting Cartesian, spherical, and array access (double precision).
Definition juno_vec_types.h:264
double arr[3]
Definition juno_vec_types.h:267
3D vector union supporting Cartesian, spherical, and array access (32-bit integer).
Definition juno_vec_types.h:382
int32_t arr[3]
Definition juno_vec_types.h:385