bool Quat::BitEquals(const Quat &other) const { return ReinterpretAsU32(x) == ReinterpretAsU32(other.x) && ReinterpretAsU32(y) == ReinterpretAsU32(other.y) && ReinterpretAsU32(z) == ReinterpretAsU32(other.z) && ReinterpretAsU32(w) == ReinterpretAsU32(other.w); }
char *SerializeFloat(float f, char *dstStr) { if (!IsNan(f)) { #ifdef MATH_WITH_GRISU3 int numChars = dtoa_grisu3((double)f, dstStr); return dstStr + numChars; #else return dstStr + sprintf(dstStr, "%.17g", f); #endif } else { u32 u = ReinterpretAsU32(f); int numChars = sprintf(dstStr, "NaN(%8X)", (unsigned int)u); return dstStr + numChars; } }
bool Sphere::BitEquals(const Sphere &other) const { return pos.BitEquals(other.pos) && ReinterpretAsU32(r) == ReinterpretAsU32(other.r); }