Esempio n. 1
0
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);
}
Esempio n. 2
0
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;
	}
}
Esempio n. 3
0
bool Sphere::BitEquals(const Sphere &other) const
{
	return pos.BitEquals(other.pos) && ReinterpretAsU32(r) == ReinterpretAsU32(other.r);
}