53 static void printHex(
float val,
const char *msg = NULL);
69 int m0,
int m1,
int m2,
int m3,
70 int m4,
int m5,
int m6,
int m7,
71 int m8,
int m9,
int m10,
int m11,
72 int m12,
int m13,
int m14,
int m15);
79 static void print(
const float &v,
const char *msg = NULL);
107 const int vRaw[4] = {x, y, z, w};
108 float *p = (
float*)&v;
109 for(
int index = 0; index < 4; ++index)
121 int m0,
int m1,
int m2,
int m3,
122 int m4,
int m5,
int m6,
int m7,
123 int m8,
int m9,
int m10,
int m11,
124 int m12,
int m13,
int m14,
int m15)
126 const int mRaw[4][4] = {{m0, m1, m2, m3},
129 {m12, m13, m14, m15}};
130 float *p = (
float*)&m.
row0;
131 for(
int index = 0; index < 16; ++index)
144 const int vRaw[4] = {x, y, z, w};
145 float *p = (
float*)&q;
146 for(
int index = 0; index < 4; ++index)
159 const int vRaw[4] = {x, y, z, w};
160 float *p = (
float*)&pl;
161 for(
int index = 0; index < 4; ++index)
193 const float *p = (
const float*)&v;
212 const float *p = (
const float*)&q;
231 const float *p = (
const float*)&pl;
252 char buffer[(
sizeof(int)*2)+3];
256 for(
int i =
sizeof(
int)*2-1; i > -1; --i )
258 tmp = (
bits >> (i*4) ) & 0xF;
261 *p++ = tmp - 10 +
'A';
281 n_printf(
"%10.4f %10.4f %10.4f %10.4f", v.
x, v.
y, v.
z, v.
w);
329 " magnitude: %f rad: %f deg: %f\n",
This class is supposed to make it easier, to restore the exact value of floating- point-based types,...
Definition debugfloat.h:50
static void printHex(float val, const char *msg=NULL)
print float's bit pattern as hex to stdout
Definition debugfloat.h:247
static void print(const float &v, const char *msg=NULL)
print float's values plain to stdout
Definition debugfloat.h:290
static void print(const Math::plane &p, const char *msg=NULL)
print plane's values plain to stdout
static void restoreHex(float &v, int val)
Definition debugfloat.h:95
void __cdecl n_printf(const char *msg,...)
Nebula's printf replacement.
Definition debug.cc:209
Definition corepagehandler.cc:13
int bits
Definition globalconstants.cc:28
__forceinline constexpr scalar rad2deg(scalar r)
Definition scalar.h:477
__forceinline scalar angle(const vec3 &v0, const vec3 &v1)
Definition vec3.h:508
__forceinline scalar length(const quat &q)
Definition quat.h:259
float scalar
Definition scalar.h:45
__forceinline scalar acos(scalar x)
Definition scalar.h:218
__forceinline bool nearequal(const point &v0, const point &v1, float epsilon)
Definition point.h:485
A & TypePunning(B &v)
Definition typepunning.h:21
Nebula's scalar datatype.
A 4x4 single point precision float matrix.
Definition mat4.h:49
vec4 row3
Definition mat4.h:138
vec4 row1
Definition mat4.h:136
vec4 row0
Definition mat4.h:135
vec4 row2
Definition mat4.h:137
A mathematical plane represented by a normal and a distance from origin.
Definition plane.h:22
A quaternion is usually used to represent an orientation in 3D space.
Definition quat.h:30
float y
Definition quat.h:78
float z
Definition quat.h:78
float w
Definition quat.h:78
float x
Definition quat.h:78
A 4D vector.
Definition vec4.h:24
float y
Definition vec4.h:93
float z
Definition vec4.h:93
float w
Definition vec4.h:93
float x
Definition vec4.h:93