瀏覽代碼

core: add a double complex type.

legacy
Sam Hocevar sam 13 年之前
父節點
當前提交
5b950dbda5
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. +5
    -3
      src/matrix.h

+ 5
- 3
src/matrix.h 查看文件

@@ -28,6 +28,7 @@ namespace lol
template <typename T> struct tname; \
typedef tname<half> f16##suffix; \
typedef tname<float> suffix; \
typedef tname<double> f64##suffix; \
typedef tname<int8_t> i8##suffix; \
typedef tname<uint8_t> u8##suffix; \
typedef tname<int16_t> 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<T> operator /(Quat<T> x, Quat<T> 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, *) \


Loading…
取消
儲存