diff --git a/src/matrix.h b/src/matrix.h index 4fbc2954..8b2c94ab 100644 --- a/src/matrix.h +++ b/src/matrix.h @@ -28,6 +28,7 @@ namespace lol template struct tname; \ typedef tname f16##suffix; \ typedef tname suffix; \ + typedef tname f64##suffix; \ typedef tname i8##suffix; \ typedef tname u8##suffix; \ typedef tname i16##suffix; \ @@ -110,10 +111,10 @@ VECTOR_TYPES(Mat4, mat4) return acc; \ } \ \ - inline float len() const \ + inline double len() const \ { \ using namespace std; \ - return sqrtf((float)sqlen()); \ + return sqrt((double)sqlen()); \ } \ \ void printf() const; @@ -446,7 +447,8 @@ static inline Quat operator /(Quat x, Quat const &y) #define SCALAR_GLOBAL2(tname, op) \ SCALAR_GLOBAL(tname, op, int) \ - SCALAR_GLOBAL(tname, op, float) + SCALAR_GLOBAL(tname, op, float) \ + SCALAR_GLOBAL(tname, op, double) #define GLOBALS(tname) \ SCALAR_GLOBAL2(tname, *) \