{
vec3_t origin;
Matrix4x4_OriginFromMatrix(&e->render.matrix, origin);
- dpsnprintf(t, sizeof(t), "%.9g %.9g %.9g", origin[0], origin[1], origin[2]);
+ dpsnprintf(t, sizeof(t), VECTOR_LOSSLESS_FORMAT, origin[0], origin[1], origin[2]);
}
}
if(!t[0])
dpsnprintf (line, linelength, "void");
break;
case ev_float:
- dpsnprintf (line, linelength, "%.9g", val->_float);
+ dpsnprintf (line, linelength, FLOAT_LOSSLESS_FORMAT, val->_float);
break;
case ev_vector:
- dpsnprintf (line, linelength, "%.9g %.9g %.9g", val->vector[0], val->vector[1], val->vector[2]);
+ dpsnprintf (line, linelength, VECTOR_LOSSLESS_FORMAT, val->vector[0], val->vector[1], val->vector[2]);
break;
default:
dpsnprintf (line, linelength, "bad type %i", type);
#ifdef PRVM_64
#define FLOAT_IS_TRUE_FOR_INT(x) ((x) & 0x7FFFFFFFFFFFFFFF) // also match "negative zero" doubles of value 0x8000000000000000
+#define FLOAT_LOSSLESS_FORMART "%.17g"
+#define VECTOR_LOSSLESS_FORMART "%.17g %.17g %.17g"
#else
#define FLOAT_IS_TRUE_FOR_INT(x) ((x) & 0x7FFFFFFF) // also match "negative zero" floats of value 0x80000000
+#define FLOAT_LOSSLESS_FORMART "%.9g"
+#define VECTOR_LOSSLESS_FORMART "%.9g %.9g %.9g"
#endif
#endif