// expected to being used rarely, it can be defined in terms of other operators and constructors,\r
// for example:\r
// \r
-// ivec2 operator + (const ivec2 x, const ivec2 y) {\r
+// ivec2 ____operator + (const ivec2 x, const ivec2 y) {\r
// return ivec2 (x[0] + y[0], x[1] + y[1]);\r
// }\r
// \r
// floating-point value is dropped.\r
// \r
\r
-int constructor (const float _f) {\r
+int __constructor (const float _f) {\r
int _i;\r
__asm float_to_int _i, _f;\r
return _i;\r
// false, and nonzero values are converted to true.\r
// \r
\r
-bool constructor (const int _i) {\r
+bool __constructor (const int _i) {\r
return _i != 0;\r
}\r
\r
-bool constructor (const float _f) {\r
+bool __constructor (const float _f) {\r
return _f != 0.0;\r
}\r
\r
// 0.0, and true is converted to 1 or 1.0.\r
// \r
\r
-int constructor (const bool _b) {\r
+int __constructor (const bool _b) {\r
return _b ? 1 : 0;\r
}\r
\r
-float constructor (const bool _b) {\r
+float __constructor (const bool _b) {\r
return _b ? 1.0 : 0.0;\r
}\r
\r
// Int to float constructor.\r
// \r
\r
-float constructor (const int _i) {\r
+float __constructor (const int _i) {\r
float _f;\r
__asm int_to_float _f, _i;\r
return _f;\r
// Identity constructors, like float(float) are also legal, but of little use.\r
// \r
\r
-bool constructor (const bool _b) {\r
+bool __constructor (const bool _b) {\r
return _b;\r
}\r
\r
-int constructor (const int _i) {\r
+int __constructor (const int _i) {\r
return _i;\r
}\r
\r
-float constructor (const float _f) {\r
+float __constructor (const float _f) {\r
return _f;\r
}\r
\r
// the parameters.\r
// \r
\r
-vec2 constructor (const float _f) {\r
+vec2 __constructor (const float _f) {\r
return vec2 (_f, _f);\r
}\r
\r
-vec2 constructor (const int _i) {\r
+vec2 __constructor (const int _i) {\r
return vec2 (_i, _i);\r
}\r
\r
-vec2 constructor (const bool _b) {\r
+vec2 __constructor (const bool _b) {\r
return vec2 (_b, _b);\r
}\r
\r
-vec3 constructor (const float _f) {\r
+vec3 __constructor (const float _f) {\r
return vec3 (_f, _f, _f);\r
}\r
\r
-vec3 constructor (const int _i) {\r
+vec3 __constructor (const int _i) {\r
return vec3 (_i, _i, _i);\r
}\r
\r
-vec3 constructor (const bool _b) {\r
+vec3 __constructor (const bool _b) {\r
return vec3 (_b, _b, _b);\r
}\r
\r
-vec4 constructor (const float _f) {\r
+vec4 __constructor (const float _f) {\r
return vec4 (_f, _f, _f, _f);\r
}\r
\r
-vec4 constructor (const int _i) {\r
+vec4 __constructor (const int _i) {\r
return vec4 (_i, _i, _i, _i);\r
}\r
\r
-vec4 constructor (const bool _b) {\r
+vec4 __constructor (const bool _b) {\r
return vec4 (_b, _b, _b, _b);\r
}\r
\r
-ivec2 constructor (const int _i) {\r
+ivec2 __constructor (const int _i) {\r
return ivec2 (_i, _i);\r
}\r
\r
-ivec2 constructor (const float _f) {\r
+ivec2 __constructor (const float _f) {\r
return ivec2 (_f, _f);\r
}\r
\r
-ivec2 constructor (const bool _b) {\r
+ivec2 __constructor (const bool _b) {\r
return ivec2 (_b, _b);\r
}\r
\r
-ivec3 constructor (const int _i) {\r
+ivec3 __constructor (const int _i) {\r
return ivec3 (_i, _i, _i);\r
}\r
\r
-ivec3 constructor (const float _f) {\r
+ivec3 __constructor (const float _f) {\r
return ivec3 (_f, _f, _f);\r
}\r
\r
-ivec3 constructor (const bool _b) {\r
+ivec3 __constructor (const bool _b) {\r
return ivec3 (_b, _b, _b);\r
}\r
\r
-ivec4 constructor (const int _i) {\r
+ivec4 __constructor (const int _i) {\r
return ivec4 (_i, _i, _i, _i);\r
}\r
\r
-ivec4 constructor (const float _f) {\r
+ivec4 __constructor (const float _f) {\r
return ivec4 (_f, _f, _f, _f);\r
}\r
\r
-ivec4 constructor (const bool _b) {\r
+ivec4 __constructor (const bool _b) {\r
return ivec4 (_b, _b, _b, _b);\r
}\r
\r
-bvec2 constructor (const bool _b) {\r
+bvec2 __constructor (const bool _b) {\r
return bvec2 (_b, _b);\r
}\r
\r
-bvec2 constructor (const float _f) {\r
+bvec2 __constructor (const float _f) {\r
return bvec2 (_f, _f);\r
}\r
\r
-bvec2 constructor (const int _i) {\r
+bvec2 __constructor (const int _i) {\r
return bvec2 (_i, _i);\r
}\r
\r
-bvec3 constructor (const bool _b) {\r
+bvec3 __constructor (const bool _b) {\r
return bvec3 (_b, _b, _b);\r
}\r
\r
-bvec3 constructor (const float _f) {\r
+bvec3 __constructor (const float _f) {\r
return bvec3 (_f, _f, _f);\r
}\r
\r
-bvec3 constructor (const int _i) {\r
+bvec3 __constructor (const int _i) {\r
return bvec3 (_i, _i, _i);\r
}\r
\r
-bvec4 constructor (const bool _b) {\r
+bvec4 __constructor (const bool _b) {\r
return bvec4 (_b, _b, _b, _b);\r
}\r
\r
-bvec4 constructor (const float _f) {\r
+bvec4 __constructor (const float _f) {\r
return bvec4 (_f, _f, _f, _f);\r
}\r
\r
-bvec4 constructor (const int _i) {\r
+bvec4 __constructor (const int _i) {\r
return bvec4 (_i, _i, _i, _i);\r
}\r
\r
// the parameters.\r
// \r
\r
-mat2 constructor (const float _f) {\r
+mat2 __constructor (const float _f) {\r
return mat2 (\r
_f, .0,\r
.0, _f\r
);\r
}\r
\r
-mat2 constructor (const int _i) {\r
+mat2 __constructor (const int _i) {\r
return mat2 (\r
_i, .0,\r
.0, _i\r
);\r
}\r
\r
-mat2 constructor (const bool _b) {\r
+mat2 __constructor (const bool _b) {\r
return mat2 (\r
_b, .0,\r
.0, _b\r
);\r
}\r
\r
-mat3 constructor (const float _f) {\r
+mat3 __constructor (const float _f) {\r
return mat3 (\r
_f, .0, .0,\r
.0, _f, .0,\r
);\r
}\r
\r
-mat3 constructor (const int _i) {\r
+mat3 __constructor (const int _i) {\r
return mat3 (\r
_i, .0, .0,\r
.0, _i, .0,\r
);\r
}\r
\r
-mat3 constructor (const bool _b) {\r
+mat3 __constructor (const bool _b) {\r
return mat3 (\r
_b, .0, .0,\r
.0, _b, .0,\r
);\r
}\r
\r
-mat4 constructor (const float _f) {\r
+mat4 __constructor (const float _f) {\r
return mat4 (\r
_f, .0, .0, .0,\r
.0, _f, .0, .0,\r
);\r
}\r
\r
-mat4 constructor (const int _i) {\r
+mat4 __constructor (const int _i) {\r
return mat4 (\r
_i, .0, .0, .0,\r
.0, _i, .0, .0,\r
);\r
}\r
\r
-mat4 constructor (const bool _b) {\r
+mat4 __constructor (const bool _b) {\r
return mat4 (\r
_b, .0, .0, .0,\r
.0, _b, .0, .0,\r
// assignment.\r
// \r
\r
-void operator = (inout float a, const float b) {\r
+void __operator = (inout float a, const float b) {\r
__asm float_copy a, b;\r
}\r
\r
-void operator = (inout int a, const int b) {\r
+void __operator = (inout int a, const int b) {\r
__asm int_copy a, b;\r
}\r
\r
-void operator = (inout bool a, const bool b) {\r
+void __operator = (inout bool a, const bool b) {\r
__asm bool_copy a, b;\r
}\r
\r
-void operator = (inout vec2 v, const vec2 u) {\r
+void __operator = (inout vec2 v, const vec2 u) {\r
v.x = u.x, v.y = u.y;\r
}\r
\r
-void operator = (inout vec3 v, const vec3 u) {\r
+void __operator = (inout vec3 v, const vec3 u) {\r
v.x = u.x, v.y = u.y, v.z = u.z;\r
}\r
\r
-void operator = (inout vec4 v, const vec4 u) {\r
+void __operator = (inout vec4 v, const vec4 u) {\r
v.x = u.x, v.y = u.y, v.z = u.z, v.w = u.w;\r
}\r
\r
-void operator = (inout ivec2 v, const ivec2 u) {\r
+void __operator = (inout ivec2 v, const ivec2 u) {\r
v.x = u.x, v.y = u.y;\r
}\r
\r
-void operator = (inout ivec3 v, const ivec3 u) {\r
+void __operator = (inout ivec3 v, const ivec3 u) {\r
v.x = u.x, v.y = u.y, v.z = u.z;\r
}\r
\r
-void operator = (inout ivec4 v, const ivec4 u) {\r
+void __operator = (inout ivec4 v, const ivec4 u) {\r
v.x = u.x, v.y = u.y, v.z = u.z, v.w = u.w;\r
}\r
\r
-void operator = (inout bvec2 v, const bvec2 u) {\r
+void __operator = (inout bvec2 v, const bvec2 u) {\r
v.x = u.x, v.y = u.y;\r
}\r
\r
-void operator = (inout bvec3 v, const bvec3 u) {\r
+void __operator = (inout bvec3 v, const bvec3 u) {\r
v.x = u.x, v.y = u.y, v.z = u.z;\r
}\r
\r
-void operator = (inout bvec4 v, const bvec4 u) {\r
+void __operator = (inout bvec4 v, const bvec4 u) {\r
v.x = u.x, v.y = u.y, v.z = u.z, v.w = u.w;\r
}\r
\r
-void operator = (inout mat2 m, const mat2 n) {\r
+void __operator = (inout mat2 m, const mat2 n) {\r
m[0] = n[0], m[1] = n[1];\r
}\r
\r
-void operator = (inout mat3 m, const mat3 n) {\r
+void __operator = (inout mat3 m, const mat3 n) {\r
m[0] = n[0], m[1] = n[1], m[2] = n[2];\r
}\r
\r
-void operator = (inout mat4 m, const mat4 n) {\r
+void __operator = (inout mat4 m, const mat4 n) {\r
m[0] = n[0], m[1] = n[1], m[2] = n[2], m[3] = n[3];\r
}\r
\r
// into (/=). The variable and expression must be the same floating-point or integer type, ...\r
// \r
\r
-void operator += (inout float a, const float b) {\r
+void __operator += (inout float a, const float b) {\r
__asm float_add a, b;\r
}\r
\r
-void operator -= (inout float a, const float b) {\r
+void __operator -= (inout float a, const float b) {\r
a += -b;\r
}\r
\r
-void operator *= (inout float a, const float b) {\r
+void __operator *= (inout float a, const float b) {\r
__asm float_multiply a, b;\r
}\r
\r
-void operator /= (inout float a, const float b) {\r
+void __operator /= (inout float a, const float b) {\r
__asm float_divide a, b;\r
}\r
\r
-void operator += (inout int x, const int y) {\r
+void __operator += (inout int x, const int y) {\r
__asm int_add x, y;\r
}\r
\r
-void operator -= (inout int x, const int y) {\r
+void __operator -= (inout int x, const int y) {\r
x += -y;\r
}\r
\r
-void operator *= (inout int x, const int y) {\r
+void __operator *= (inout int x, const int y) {\r
__asm int_multiply x, y;\r
}\r
\r
-void operator /= (inout int x, const int y) {\r
+void __operator /= (inout int x, const int y) {\r
__asm int_divide x, y;\r
}\r
\r
-void operator += (inout vec2 v, const vec2 u) {\r
+void __operator += (inout vec2 v, const vec2 u) {\r
v.x += u.x, v.y += u.y;\r
}\r
\r
-void operator -= (inout vec2 v, const vec2 u) {\r
+void __operator -= (inout vec2 v, const vec2 u) {\r
v.x -= u.x, v.y -= u.y;\r
}\r
\r
-void operator *= (inout vec2 v, const vec2 u) {\r
+void __operator *= (inout vec2 v, const vec2 u) {\r
v.x *= u.x, v.y *= u.y;\r
}\r
\r
-void operator /= (inout vec2 v, const vec2 u) {\r
+void __operator /= (inout vec2 v, const vec2 u) {\r
v.x /= u.x, v.y /= u.y;\r
}\r
\r
-void operator += (inout vec3 v, const vec3 u) {\r
+void __operator += (inout vec3 v, const vec3 u) {\r
v.x += u.x, v.y += u.y, v.z += u.z;\r
}\r
\r
-void operator -= (inout vec3 v, const vec3 u) {\r
+void __operator -= (inout vec3 v, const vec3 u) {\r
v.x -= u.x, v.y -= u.y, v.z -= u.z;\r
}\r
\r
-void operator *= (inout vec3 v, const vec3 u) {\r
+void __operator *= (inout vec3 v, const vec3 u) {\r
v.x *= u.x, v.y *= u.y, v.z *= u.z;\r
}\r
\r
-void operator /= (inout vec3 v, const vec3 u) {\r
+void __operator /= (inout vec3 v, const vec3 u) {\r
v.x /= u.x, v.y /= u.y, v.z /= u.z;\r
}\r
\r
-void operator += (inout vec4 v, const vec4 u) {\r
+void __operator += (inout vec4 v, const vec4 u) {\r
v.x += u.x, v.y += u.y, v.z += u.z, v.w += u.w;\r
}\r
\r
-void operator -= (inout vec4 v, const vec4 u) {\r
+void __operator -= (inout vec4 v, const vec4 u) {\r
v.x -= u.x, v.y -= u.y, v.z -= u.z, v.w -= u.w;\r
}\r
\r
-void operator *= (inout vec4 v, const vec4 u) {\r
+void __operator *= (inout vec4 v, const vec4 u) {\r
v.x *= u.x, v.y *= u.y, v.z *= u.z, v.w *= u.w;\r
}\r
\r
-void operator /= (inout vec4 v, const vec4 u) {\r
+void __operator /= (inout vec4 v, const vec4 u) {\r
v.x /= u.x, v.y /= u.y, v.z /= u.z, v.w /= u.w;\r
}\r
\r
-void operator += (inout ivec2 v, const ivec2 u) {\r
+void __operator += (inout ivec2 v, const ivec2 u) {\r
v.x += u.x, v.y += u.y;\r
}\r
\r
-void operator -= (inout ivec2 v, const ivec2 u) {\r
+void __operator -= (inout ivec2 v, const ivec2 u) {\r
v.x -= u.x, v.y -= u.y;\r
}\r
\r
-void operator *= (inout ivec2 v, const ivec2 u) {\r
+void __operator *= (inout ivec2 v, const ivec2 u) {\r
v.x *= u.x, v.y *= u.y;\r
}\r
\r
-void operator /= (inout ivec2 v, const ivec2 u) {\r
+void __operator /= (inout ivec2 v, const ivec2 u) {\r
v.x /= u.x, v.y /= u.y;\r
}\r
\r
-void operator += (inout ivec3 v, const ivec3 u) {\r
+void __operator += (inout ivec3 v, const ivec3 u) {\r
v.x += u.x, v.y += u.y, v.z += u.z;\r
}\r
\r
-void operator -= (inout ivec3 v, const ivec3 u) {\r
+void __operator -= (inout ivec3 v, const ivec3 u) {\r
v.x -= u.x, v.y -= u.y, v.z -= u.z;\r
}\r
\r
-void operator *= (inout ivec3 v, const ivec3 u) {\r
+void __operator *= (inout ivec3 v, const ivec3 u) {\r
v.x *= u.x, v.y *= u.y, v.z *= u.z;\r
}\r
\r
-void operator /= (inout ivec3 v, const ivec3 u) {\r
+void __operator /= (inout ivec3 v, const ivec3 u) {\r
v.x /= u.x, v.y /= u.y, v.z /= u.z;\r
}\r
\r
-void operator += (inout ivec4 v, const ivec4 u) {\r
+void __operator += (inout ivec4 v, const ivec4 u) {\r
v.x += u.x, v.y += u.y, v.z += u.z, v.w += u.w;\r
}\r
\r
-void operator -= (inout ivec4 v, const ivec4 u) {\r
+void __operator -= (inout ivec4 v, const ivec4 u) {\r
v.x -= u.x, v.y -= u.y, v.z -= u.z, v.w -= u.w;\r
}\r
\r
-void operator *= (inout ivec4 v, const ivec4 u) {\r
+void __operator *= (inout ivec4 v, const ivec4 u) {\r
v.x *= u.x, v.y *= u.y, v.z *= u.z, v.w *= u.w;\r
}\r
\r
-void operator /= (inout ivec4 v, const ivec4 u) {\r
+void __operator /= (inout ivec4 v, const ivec4 u) {\r
v.x /= u.x, v.y /= u.y, v.z /= u.z, v.w /= u.w;\r
}\r
\r
-void operator += (inout mat2 m, const mat2 n) {\r
+void __operator += (inout mat2 m, const mat2 n) {\r
m[0] += n[0], m[1] += n[1];\r
}\r
\r
-void operator -= (inout mat2 v, const mat2 n) {\r
+void __operator -= (inout mat2 v, const mat2 n) {\r
m[0] -= n[0], m[1] -= n[1];\r
}\r
\r
-void operator *= (inout mat2 m, const mat2 n) {\r
+void __operator *= (inout mat2 m, const mat2 n) {\r
m = m * n;\r
}\r
\r
-void operator /= (inout mat2 m, const mat2 n) {\r
+void __operator /= (inout mat2 m, const mat2 n) {\r
m[0] /= n[0], m[1] /= n[1];\r
}\r
\r
-void operator += (inout mat3 m, const mat3 n) {\r
+void __operator += (inout mat3 m, const mat3 n) {\r
m[0] += n[0], m[1] += n[1], m[2] += n[2];\r
}\r
\r
-void operator -= (inout mat3 m, const mat3 n) {\r
+void __operator -= (inout mat3 m, const mat3 n) {\r
m[0] -= n[0], m[1] -= n[1], m[2] -= n[2];\r
}\r
\r
-void operator *= (inout mat3 m, const mat3 n) {\r
+void __operator *= (inout mat3 m, const mat3 n) {\r
m = m * n;\r
}\r
\r
-void operator /= (inout mat3 m, const mat3 n) {\r
+void __operator /= (inout mat3 m, const mat3 n) {\r
m[0] /= n[0], m[1] /= n[1], m[2] /= n[2];\r
}\r
\r
-void operator += (inout mat4 m, const mat4 n) {\r
+void __operator += (inout mat4 m, const mat4 n) {\r
m[0] += n[0], m[1] += n[1], m[2] += n[2], m[3] += n[3];\r
}\r
\r
-void operator -= (inout mat4 m, const mat4 n) {\r
+void __operator -= (inout mat4 m, const mat4 n) {\r
m[0] -= n[0], m[1] -= n[1], m[2] -= n[2], m[3] -= n[3];\r
}\r
\r
-void operator *= (inout mat4 m, const mat4 n) {\r
+void __operator *= (inout mat4 m, const mat4 n) {\r
m = m * n;\r
}\r
\r
-void operator /= (inout mat4 m, const mat4 n) {\r
+void __operator /= (inout mat4 m, const mat4 n) {\r
m[0] /= n[0], m[1] /= n[1], m[2] /= n[2], m[3] /= n[3];\r
}\r
\r
// a matrix, ...\r
// \r
\r
-void operator += (inout vec2 v, const float a) {\r
+void __operator += (inout vec2 v, const float a) {\r
v.x += a, v.y += a;\r
}\r
\r
-void operator -= (inout vec2 v, const float a) {\r
+void __operator -= (inout vec2 v, const float a) {\r
v.x -= a, v.y -= a;\r
}\r
\r
-void operator *= (inout vec2 v, const float a) {\r
+void __operator *= (inout vec2 v, const float a) {\r
v.x *= a, v.y *= a;\r
}\r
\r
-void operator /= (inout vec2 v, const float a) {\r
+void __operator /= (inout vec2 v, const float a) {\r
v.x /= a, v.y /= a;\r
}\r
\r
-void operator += (inout vec3 v, const float a) {\r
+void __operator += (inout vec3 v, const float a) {\r
v.x += a, v.y += a, v.z += a;\r
}\r
\r
-void operator -= (inout vec3 v, const float a) {\r
+void __operator -= (inout vec3 v, const float a) {\r
v.x -= a, v.y -= a, v.z -= a;\r
}\r
\r
-void operator *= (inout vec3 v, const float a) {\r
+void __operator *= (inout vec3 v, const float a) {\r
v.x *= a, v.y *= a, v.z *= a;\r
}\r
\r
-void operator /= (inout vec3 v, const float a) {\r
+void __operator /= (inout vec3 v, const float a) {\r
v.x /= a, v.y /= a, v.z /= a;\r
}\r
\r
-void operator += (inout vec4 v, const float a) {\r
+void __operator += (inout vec4 v, const float a) {\r
v.x += a, v.y += a, v.z += a, v.w += a;\r
}\r
\r
-void operator -= (inout vec4 v, const float a) {\r
+void __operator -= (inout vec4 v, const float a) {\r
v.x -= a, v.y -= a, v.z -= a, v.w -= a;\r
}\r
\r
-void operator *= (inout vec4 v, const float a) {\r
+void __operator *= (inout vec4 v, const float a) {\r
v.x *= a, v.y *= a, v.z *= a, v.w *= a;\r
}\r
\r
-void operator /= (inout vec4 v, const float a) {\r
+void __operator /= (inout vec4 v, const float a) {\r
v.x /= a, v.y /= a, v.z /= a, v.w /= a;\r
}\r
\r
-void operator += (inout mat2 m, const float a) {\r
+void __operator += (inout mat2 m, const float a) {\r
m[0] += a, m[1] += a;\r
}\r
\r
-void operator -= (inout mat2 m, const float a) {\r
+void __operator -= (inout mat2 m, const float a) {\r
m[0] -= a, m[1] -= a;\r
}\r
\r
-void operator *= (inout mat2 m, const float a) {\r
+void __operator *= (inout mat2 m, const float a) {\r
m[0] *= a, m[1] *= a;\r
}\r
\r
-void operator /= (inout mat2 m, const float a) {\r
+void __operator /= (inout mat2 m, const float a) {\r
m[0] /= a, m[1] /= a;\r
}\r
\r
-void operator += (inout mat3 m, const float a) {\r
+void __operator += (inout mat3 m, const float a) {\r
m[0] += a, m[1] += a, m[2] += a;\r
}\r
\r
-void operator -= (inout mat3 m, const float a) {\r
+void __operator -= (inout mat3 m, const float a) {\r
m[0] -= a, m[1] -= a, m[2] -= a;\r
}\r
\r
-void operator *= (inout mat3 m, const float a) {\r
+void __operator *= (inout mat3 m, const float a) {\r
m[0] *= a, m[1] *= a, m[2] *= a;\r
}\r
\r
-void operator /= (inout mat3 m, const float a) {\r
+void __operator /= (inout mat3 m, const float a) {\r
m[0] /= a, m[1] /= a, m[2] /= a;\r
}\r
\r
-void operator += (inout mat4 m, const float a) {\r
+void __operator += (inout mat4 m, const float a) {\r
m[0] += a, m[1] += a, m[2] += a, m[3] += a;\r
}\r
\r
-void operator -= (inout mat4 m, const float a) {\r
+void __operator -= (inout mat4 m, const float a) {\r
m[0] -= a, m[1] -= a, m[2] -= a, m[3] -= a;\r
}\r
\r
-void operator *= (inout mat4 m, const float a) {\r
+void __operator *= (inout mat4 m, const float a) {\r
m[0] *= a, m[1] *= a, m[2] *= a, m[3] *= a;\r
}\r
\r
-void operator /= (inout mat4 m, const float a) {\r
+void __operator /= (inout mat4 m, const float a) {\r
m[0] /= a, m[1] /= a, m[2] /= a, m[3] /= a;\r
}\r
\r
// expression can be a matrix of matching size.\r
// \r
\r
-void operator *= (inout vec2 v, const mat2 m) {\r
+void __operator *= (inout vec2 v, const mat2 m) {\r
v = v * m;\r
}\r
\r
-void operator *= (inout vec3 v, const mat3 m) {\r
+void __operator *= (inout vec3 v, const mat3 m) {\r
v = v * m;\r
}\r
\r
-void operator *= (inout vec4 v, const mat4 m) {\r
+void __operator *= (inout vec4 v, const mat4 m) {\r
v = v * m;\r
}\r
\r
// The two operands must be the same type, ...\r
// \r
\r
-float operator + (const float a, const float b) {\r
+float __operator + (const float a, const float b) {\r
float c = a;\r
return c += b;\r
}\r
\r
-float operator - (const float a, const float b) {\r
+float __operator - (const float a, const float b) {\r
return a + -b;\r
}\r
\r
-float operator * (const float a, const float b) {\r
+float __operator * (const float a, const float b) {\r
float c = a;\r
return c *= b;\r
}\r
\r
-float operator / (const float a, const float b) {\r
+float __operator / (const float a, const float b) {\r
float c = a;\r
return c /= b;\r
}\r
\r
-int operator + (const int a, const int b) {\r
+int __operator + (const int a, const int b) {\r
int c = a;\r
return c += b;\r
}\r
\r
-int operator - (const int x, const int y) {\r
+int __operator - (const int x, const int y) {\r
return x + -y;\r
}\r
\r
-int operator * (const int x, const int y) {\r
+int __operator * (const int x, const int y) {\r
int z = x;\r
return z *= y;\r
}\r
\r
-int operator / (const int x, const int y) {\r
+int __operator / (const int x, const int y) {\r
int z = x;\r
return z /= y;\r
}\r
\r
-vec2 operator + (const vec2 v, const vec2 u) {\r
+vec2 __operator + (const vec2 v, const vec2 u) {\r
return vec2 (v.x + u.x, v.y + u.y);\r
}\r
\r
-vec2 operator - (const vec2 v, const vec2 u) {\r
+vec2 __operator - (const vec2 v, const vec2 u) {\r
return vec2 (v.x - u.x, v.y - u.y);\r
}\r
\r
-vec3 operator + (const vec3 v, const vec3 u) {\r
+vec3 __operator + (const vec3 v, const vec3 u) {\r
return vec3 (v.x + u.x, v.y + u.y, v.z + u.z);\r
}\r
\r
-vec3 operator - (const vec3 v, const vec3 u) {\r
+vec3 __operator - (const vec3 v, const vec3 u) {\r
return vec3 (v.x - u.x, v.y - u.y, v.z - u.z);\r
}\r
\r
-vec4 operator + (const vec4 v, const vec4 u) {\r
+vec4 __operator + (const vec4 v, const vec4 u) {\r
return vec4 (v.x + u.x, v.y + u.y, v.z + u.z, v.w + u.w);\r
}\r
\r
-vec4 operator - (const vec4 v, const vec4 u) {\r
+vec4 __operator - (const vec4 v, const vec4 u) {\r
return vec4 (v.x - u.x, v.y - u.y, v.z - u.z, v.w - u.w);\r
}\r
\r
-ivec2 operator + (const ivec2 v, const ivec2 u) {\r
+ivec2 __operator + (const ivec2 v, const ivec2 u) {\r
return ivec2 (v.x + u.x, v.y + u.y);\r
}\r
\r
-ivec2 operator - (const ivec2 v, const ivec2 u) {\r
+ivec2 __operator - (const ivec2 v, const ivec2 u) {\r
return ivec2 (v.x - u.x, v.y - u.y);\r
}\r
\r
-ivec3 operator + (const ivec3 v, const ivec3 u) {\r
+ivec3 __operator + (const ivec3 v, const ivec3 u) {\r
return ivec3 (v.x + u.x, v.y + u.y, v.z + u.z);\r
}\r
\r
-ivec3 operator - (const ivec3 v, const ivec3 u) {\r
+ivec3 __operator - (const ivec3 v, const ivec3 u) {\r
return ivec3 (v.x - u.x, v.y - u.y, v.z - u.z);\r
}\r
\r
-ivec4 operator + (const ivec4 v, const ivec4 u) {\r
+ivec4 __operator + (const ivec4 v, const ivec4 u) {\r
return ivec4 (v.x + u.x, v.y + u.y, v.z + u.z, v.w + u.w);\r
}\r
\r
-ivec4 operator - (const ivec4 v, const ivec4 u) {\r
+ivec4 __operator - (const ivec4 v, const ivec4 u) {\r
return ivec4 (v.x - u.x, v.y - u.y, v.z - u.z, v.w - u.w);\r
}\r
\r
-mat2 operator + (const mat2 m, const mat2 n) {\r
+mat2 __operator + (const mat2 m, const mat2 n) {\r
return mat2 (m[0] + n[0], m[1] + n[1]);\r
}\r
\r
-mat2 operator - (const mat2 m, const mat2 n) {\r
+mat2 __operator - (const mat2 m, const mat2 n) {\r
return mat2 (m[0] - n[0], m[1] - n[1]);\r
}\r
\r
-mat3 operator + (const mat3 m, const mat3 n) {\r
+mat3 __operator + (const mat3 m, const mat3 n) {\r
return mat3 (m[0] + n[0], m[1] + n[1], m[2] + n[2]);\r
}\r
\r
-mat3 operator - (const mat3 m, const mat3 n) {\r
+mat3 __operator - (const mat3 m, const mat3 n) {\r
return mat3 (m[0] - n[0], m[1] - n[1], m[2] - n[2]);\r
}\r
\r
-mat4 operator + (const mat4 m, const mat4 n) {\r
+mat4 __operator + (const mat4 m, const mat4 n) {\r
return mat4 (m[0] + n[0], m[1] + n[1], m[2] + n[2], m[3] + n[3]);\r
}\r
\r
-mat4 operator - (const mat4 m, const mat4 n) {\r
+mat4 __operator - (const mat4 m, const mat4 n) {\r
return mat4 (m[0] - n[0], m[1] - n[1], m[2] - n[2], m[3] - n[3]);\r
}\r
\r
// ... or one must be a scalar float and the other a vector or matrix, ...\r
// \r
\r
-vec2 operator + (const float a, const vec2 u) {\r
+vec2 __operator + (const float a, const vec2 u) {\r
return vec2 (a + u.x, a + u.y);\r
}\r
\r
-vec2 operator + (const vec2 v, const float b) {\r
+vec2 __operator + (const vec2 v, const float b) {\r
return vec2 (v.x + b, v.y + b);\r
}\r
\r
-vec2 operator - (const float a, const vec2 u) {\r
+vec2 __operator - (const float a, const vec2 u) {\r
return vec2 (a - u.x, a - u.y);\r
}\r
\r
-vec2 operator - (const vec2 v, const float b) {\r
+vec2 __operator - (const vec2 v, const float b) {\r
return vec2 (v.x - b, v.y - b);\r
}\r
\r
-vec2 operator * (const float a, const vec2 u) {\r
+vec2 __operator * (const float a, const vec2 u) {\r
return vec2 (a * u.x, a * u.y);\r
}\r
\r
-vec2 operator * (const vec2 v, const float b) {\r
+vec2 __operator * (const vec2 v, const float b) {\r
return vec2 (v.x * b, v.y * b);\r
}\r
\r
-vec2 operator / (const float a, const vec2 u) {\r
+vec2 __operator / (const float a, const vec2 u) {\r
return vec2 (a / u.x, a / u.y);\r
}\r
\r
-vec2 operator / (const vec2 v, const float b) {\r
+vec2 __operator / (const vec2 v, const float b) {\r
return vec2 (v.x / b, v.y / b);\r
}\r
\r
-vec3 operator + (const float a, const vec3 u) {\r
+vec3 __operator + (const float a, const vec3 u) {\r
return vec3 (a + u.x, a + u.y, a + u.z);\r
}\r
\r
-vec3 operator + (const vec3 v, const float b) {\r
+vec3 __operator + (const vec3 v, const float b) {\r
return vec3 (v.x + b, v.y + b, v.z + b);\r
}\r
\r
-vec3 operator - (const float a, const vec3 u) {\r
+vec3 __operator - (const float a, const vec3 u) {\r
return vec3 (a - u.x, a - u.y, a - u.z);\r
}\r
\r
-vec3 operator - (const vec3 v, const float b) {\r
+vec3 __operator - (const vec3 v, const float b) {\r
return vec3 (v.x - b, v.y - b, v.z - b);\r
}\r
\r
-vec3 operator * (const float a, const vec3 u) {\r
+vec3 __operator * (const float a, const vec3 u) {\r
return vec3 (a * u.x, a * u.y, a * u.z);\r
}\r
\r
-vec3 operator * (const vec3 v, const float b) {\r
+vec3 __operator * (const vec3 v, const float b) {\r
return vec3 (v.x * b, v.y * b, v.z * b);\r
}\r
\r
-vec3 operator / (const float a, const vec3 u) {\r
+vec3 __operator / (const float a, const vec3 u) {\r
return vec3 (a / u.x, a / u.y, a / u.z);\r
}\r
\r
-vec3 operator / (const vec3 v, const float b) {\r
+vec3 __operator / (const vec3 v, const float b) {\r
return vec3 (v.x / b, v.y / b, v.z / b);\r
}\r
\r
-vec4 operator + (const float a, const vec4 u) {\r
+vec4 __operator + (const float a, const vec4 u) {\r
return vec4 (a + u.x, a + u.y, a + u.z, a + u.w);\r
}\r
\r
-vec4 operator + (const vec4 v, const float b) {\r
+vec4 __operator + (const vec4 v, const float b) {\r
return vec4 (v.x + b, v.y + b, v.z + b, v.w + b);\r
}\r
\r
-vec4 operator - (const float a, const vec4 u) {\r
+vec4 __operator - (const float a, const vec4 u) {\r
return vec4 (a - u.x, a - u.y, a - u.z, a - u.w);\r
}\r
\r
-vec4 operator - (const vec4 v, const float b) {\r
+vec4 __operator - (const vec4 v, const float b) {\r
return vec4 (v.x - b, v.y - b, v.z - b, v.w - b);\r
}\r
\r
-vec4 operator * (const float a, const vec4 u) {\r
+vec4 __operator * (const float a, const vec4 u) {\r
return vec4 (a * u.x, a * u.y, a * u.z, a * u.w);\r
}\r
\r
-vec4 operator * (const vec4 v, const float b) {\r
+vec4 __operator * (const vec4 v, const float b) {\r
return vec4 (v.x * b, v.y * b, v.z * b, v.w * b);\r
}\r
\r
-vec4 operator / (const float a, const vec4 u) {\r
+vec4 __operator / (const float a, const vec4 u) {\r
return vec4 (a / u.x, a / u.y, a / u.z, a / u.w);\r
}\r
\r
-vec4 operator / (const vec4 v, const float b) {\r
+vec4 __operator / (const vec4 v, const float b) {\r
return vec4 (v.x / b, v.y / b, v.z / b, v.w / b);\r
}\r
\r
-mat2 operator + (const float a, const mat2 n) {\r
+mat2 __operator + (const float a, const mat2 n) {\r
return mat2 (a + n[0], a + n[1]);\r
}\r
\r
-mat2 operator + (const mat2 m, const float b) {\r
+mat2 __operator + (const mat2 m, const float b) {\r
return mat2 (m[0] + b, m[1] + b);\r
}\r
\r
-mat2 operator - (const float a, const mat2 n) {\r
+mat2 __operator - (const float a, const mat2 n) {\r
return mat2 (a - n[0], a - n[1]);\r
}\r
\r
-mat2 operator - (const mat2 m, const float b) {\r
+mat2 __operator - (const mat2 m, const float b) {\r
return mat2 (m[0] - b, m[1] - b);\r
}\r
\r
-mat2 operator * (const float a, const mat2 n) {\r
+mat2 __operator * (const float a, const mat2 n) {\r
return mat2 (a * n[0], a * n[1]);\r
}\r
\r
-mat2 operator * (const mat2 m, const float b) {\r
+mat2 __operator * (const mat2 m, const float b) {\r
return mat2 (m[0] * b, m[1] * b);\r
}\r
\r
-mat2 operator / (const float a, const mat2 n) {\r
+mat2 __operator / (const float a, const mat2 n) {\r
return mat2 (a / n[0], a / n[1]);\r
}\r
\r
-mat2 operator / (const mat2 m, const float b) {\r
+mat2 __operator / (const mat2 m, const float b) {\r
return mat2 (m[0] / b, m[1] / b);\r
}\r
\r
-mat3 operator + (const float a, const mat3 n) {\r
+mat3 __operator + (const float a, const mat3 n) {\r
return mat3 (a + n[0], a + n[1], a + n[2]);\r
}\r
\r
-mat3 operator + (const mat3 m, const float b) {\r
+mat3 __operator + (const mat3 m, const float b) {\r
return mat3 (m[0] + b, m[1] + b, m[2] + b);\r
}\r
\r
-mat3 operator - (const float a, const mat3 n) {\r
+mat3 __operator - (const float a, const mat3 n) {\r
return mat3 (a - n[0], a - n[1], a - n[2]);\r
}\r
\r
-mat3 operator - (const mat3 m, const float b) {\r
+mat3 __operator - (const mat3 m, const float b) {\r
return mat3 (m[0] - b, m[1] - b, m[2] - b);\r
}\r
\r
-mat3 operator * (const float a, const mat3 n) {\r
+mat3 __operator * (const float a, const mat3 n) {\r
return mat3 (a * n[0], a * n[1], a * n[2]);\r
}\r
\r
-mat3 operator * (const mat3 m, const float b) {\r
+mat3 __operator * (const mat3 m, const float b) {\r
return mat3 (m[0] * b, m[1] * b, m[2] * b);\r
}\r
\r
-mat3 operator / (const float a, const mat3 n) {\r
+mat3 __operator / (const float a, const mat3 n) {\r
return mat3 (a / n[0], a / n[1], a / n[2]);\r
}\r
\r
-mat3 operator / (const mat3 m, const float b) {\r
+mat3 __operator / (const mat3 m, const float b) {\r
return mat3 (m[0] / b, m[1] / b, m[2] / b);\r
}\r
\r
-mat4 operator + (const float a, const mat4 n) {\r
+mat4 __operator + (const float a, const mat4 n) {\r
return mat4 (a + n[0], a + n[1], a + n[2], a + n[3]);\r
}\r
\r
-mat4 operator + (const mat4 m, const float b) {\r
+mat4 __operator + (const mat4 m, const float b) {\r
return mat4 (m[0] + b, m[1] + b, m[2] + b, m[3] + b);\r
}\r
\r
-mat4 operator - (const float a, const mat4 n) {\r
+mat4 __operator - (const float a, const mat4 n) {\r
return mat4 (a - n[0], a - n[1], a - n[2], a - n[3]);\r
}\r
\r
-mat4 operator - (const mat4 m, const float b) {\r
+mat4 __operator - (const mat4 m, const float b) {\r
return mat4 (m[0] - b, m[1] - b, m[2] - b, m[3] - b);\r
}\r
\r
-mat4 operator * (const float a, const mat4 n) {\r
+mat4 __operator * (const float a, const mat4 n) {\r
return mat4 (a * n[0], a * n[1], a * n[2], a * n[3]);\r
}\r
\r
-mat4 operator * (const mat4 m, const float b) {\r
+mat4 __operator * (const mat4 m, const float b) {\r
return mat4 (m[0] * b, m[1] * b, m[2] * b, m[3] * b);\r
}\r
\r
-mat4 operator / (const float a, const mat4 n) {\r
+mat4 __operator / (const float a, const mat4 n) {\r
return mat4 (a / n[0], a / n[1], a / n[2], a / n[3]);\r
}\r
\r
-mat4 operator / (const mat4 m, const float b) {\r
+mat4 __operator / (const mat4 m, const float b) {\r
return mat4 (m[0] / b, m[1] / b, m[2] / b, m[3] / b);\r
}\r
\r
// dimension in which case the * operator will do a column vector matrix multiplication.\r
// \r
\r
-vec2 operator * (const mat2 m, const vec2 v) {\r
+vec2 __operator * (const mat2 m, const vec2 v) {\r
return vec2 (\r
v.x * m[0].x + v.y * m[1].x,\r
v.x * m[0].y + v.y * m[1].y\r
);\r
}\r
\r
-vec2 operator * (const vec2 v, const mat2 m) {\r
+vec2 __operator * (const vec2 v, const mat2 m) {\r
return vec2 (\r
v.x * m[0].x + v.y * m[0].y,\r
v.x * m[1].x + v.y * m[1].y\r
);\r
}\r
\r
-vec3 operator * (const mat3 m, const vec3 v) {\r
+vec3 __operator * (const mat3 m, const vec3 v) {\r
return vec3 (\r
v.x * m[0].x + v.y * m[1].x + v.z * m[2].x,\r
v.x * m[0].y + v.y * m[1].y + v.z * m[2].y,\r
);\r
}\r
\r
-vec3 operator * (const vec3 v, const mat3 m) {\r
+vec3 __operator * (const vec3 v, const mat3 m) {\r
return vec3 (\r
v.x * m[0].x + v.y * m[0].y + v.z * m[0].z,\r
v.x * m[1].x + v.y * m[1].y + v.z * m[1].z,\r
);\r
}\r
\r
-vec4 operator * (const mat4 m, const vec4 v) {\r
+vec4 __operator * (const mat4 m, const vec4 v) {\r
return vec4 (\r
v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + v.w * m[3].x,\r
v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + v.w * m[3].y,\r
);\r
}\r
\r
-vec4 operator * (const vec4 v, const mat4 m) {\r
+vec4 __operator * (const vec4 v, const mat4 m) {\r
return vec4 (\r
v.x * m[0].x + v.y * m[0].y + v.z * m[0].z + v.w * m[0].w,\r
v.x * m[1].x + v.y * m[1].y + v.z * m[1].z + v.w * m[1].w,\r
// Multiply (*) applied to two vectors yields a component-wise multiply.\r
// \r
\r
-vec2 operator * (const vec2 v, const vec2 u) {\r
+vec2 __operator * (const vec2 v, const vec2 u) {\r
return vec2 (v.x * u.x, v.y * u.y);\r
}\r
\r
-vec3 operator * (const vec3 v, const vec3 u) {\r
+vec3 __operator * (const vec3 v, const vec3 u) {\r
return vec3 (v.x * u.x, v.y * u.y, v.z * u.z);\r
}\r
\r
-vec4 operator * (const vec4 v, const vec4 u) {\r
+vec4 __operator * (const vec4 v, const vec4 u) {\r
return vec4 (v.x * u.x, v.y * u.y, v.z * u.z, v.w * u.w);\r
}\r
\r
-ivec2 operator * (const ivec2 v, const ivec2 u) {\r
+ivec2 __operator * (const ivec2 v, const ivec2 u) {\r
return ivec2 (v.x * u.x, v.y * u.y);\r
}\r
\r
-ivec3 operator * (const ivec3 v, const ivec3 u) {\r
+ivec3 __operator * (const ivec3 v, const ivec3 u) {\r
return ivec3 (v.x * u.x, v.y * u.y, v.z * u.z);\r
}\r
\r
-ivec4 operator * (const ivec4 v, const ivec4 u) {\r
+ivec4 __operator * (const ivec4 v, const ivec4 u) {\r
return ivec4 (v.x * u.x, v.y * u.y, v.z * u.z, v.w * u.w);\r
}\r
\r
// Dividing by zero does not cause an exception but does result in an unspecified value.\r
// \r
\r
-vec2 operator / (const vec2 v, const vec2 u) {\r
+vec2 __operator / (const vec2 v, const vec2 u) {\r
return vec2 (v.x / u.x, v.y / u.y);\r
}\r
\r
-vec3 operator / (const vec3 v, const vec3 u) {\r
+vec3 __operator / (const vec3 v, const vec3 u) {\r
return vec3 (v.x / u.x, v.y / u.y, v.z / u.z);\r
}\r
\r
-vec4 operator / (const vec4 v, const vec4 u) {\r
+vec4 __operator / (const vec4 v, const vec4 u) {\r
return vec4 (v.x / u.x, v.y / u.y, v.z / u.z, v.w / u.w);\r
}\r
\r
-ivec2 operator / (const ivec2 v, const ivec2 u) {\r
+ivec2 __operator / (const ivec2 v, const ivec2 u) {\r
return ivec2 (v.x / u.x, v.y / u.y);\r
}\r
\r
-ivec3 operator / (const ivec3 v, const ivec3 u) {\r
+ivec3 __operator / (const ivec3 v, const ivec3 u) {\r
return ivec3 (v.x / u.x, v.y / u.y, v.z / u.z);\r
}\r
\r
-ivec4 operator / (const ivec4 v, const ivec4 u) {\r
+ivec4 __operator / (const ivec4 v, const ivec4 u) {\r
return ivec4 (v.x / u.x, v.y / u.y, v.z / u.z, v.w / u.w);\r
}\r
\r
-mat2 operator / (const mat2 m, const mat2 n) {\r
+mat2 __operator / (const mat2 m, const mat2 n) {\r
return mat2 (m[0] / n[0], m[1] / n[1]);\r
}\r
\r
-mat3 operator / (const mat3 m, const mat3 n) {\r
+mat3 __operator / (const mat3 m, const mat3 n) {\r
return mat3 (m[0] / n[0], m[1] / n[1], m[2] / n[2]);\r
}\r
\r
-mat4 operator / (const mat4 m, const mat4 n) {\r
+mat4 __operator / (const mat4 m, const mat4 n) {\r
return mat4 (m[0] / n[0], m[1] / n[1], m[2] / n[2], m[3] / n[3]);\r
}\r
\r
// a component-wise multiply.\r
// \r
\r
-mat2 operator * (const mat2 m, const mat2 n) {\r
+mat2 __operator * (const mat2 m, const mat2 n) {\r
return mat2 (m * n[0], m * n[1]);\r
}\r
\r
-mat3 operator * (const mat3 m, const mat3 n) {\r
+mat3 __operator * (const mat3 m, const mat3 n) {\r
return mat3 (m * n[0], m * n[1], m * n[2]);\r
}\r
\r
-mat4 operator * (const mat4 m, const mat4 n) {\r
+mat4 __operator * (const mat4 m, const mat4 n) {\r
return mat4 (m * n[0], m * n[1], m * n[2], m * n[3]);\r
}\r
\r
// distinguish their prototypes from prefix ones.]\r
// \r
\r
-float operator - (const float a) {\r
+float __operator - (const float a) {\r
float c = a;\r
__asm float_negate c;\r
return c;\r
}\r
\r
-int operator - (const int a) {\r
+int __operator - (const int a) {\r
int c = a;\r
__asm int_negate c;\r
return c;\r
}\r
\r
-vec2 operator - (const vec2 v) {\r
+vec2 __operator - (const vec2 v) {\r
return vec2 (-v.x, -v.y);\r
}\r
\r
-vec3 operator - (const vec3 v) {\r
+vec3 __operator - (const vec3 v) {\r
return vec3 (-v.x, -v.y, -v.z);\r
}\r
\r
-vec4 operator - (const vec4 v) {\r
+vec4 __operator - (const vec4 v) {\r
return vec4 (-v.x, -v.y, -v.z, -v.w);\r
}\r
\r
-ivec2 operator - (const ivec2 v) {\r
+ivec2 __operator - (const ivec2 v) {\r
return ivec2 (-v.x, -v.y);\r
}\r
\r
-ivec3 operator - (const ivec3 v) {\r
+ivec3 __operator - (const ivec3 v) {\r
return ivec3 (-v.x, -v.y, -v.z);\r
}\r
\r
-ivec4 operator - (const ivec4 v) {\r
+ivec4 __operator - (const ivec4 v) {\r
return ivec4 (-v.x, -v.y, -v.z, -v.w);\r
}\r
\r
-mat2 operator - (const mat2 m) {\r
+mat2 __operator - (const mat2 m) {\r
return mat2 (-m[0], -m[1]);\r
}\r
\r
-mat3 operator - (const mat3 m) {\r
+mat3 __operator - (const mat3 m) {\r
return mat3 (-m[0], -m[1], -m[2]);\r
}\r
\r
-mat4 operator - (const mat4 m) {\r
+mat4 __operator - (const mat4 m) {\r
return mat4 (-m[0], -m[1], -m[2], -m[3]);\r
}\r
\r
-void operator -- (inout float a) {\r
+void __operator -- (inout float a) {\r
a -= 1.0;\r
}\r
\r
-void operator -- (inout int a) {\r
+void __operator -- (inout int a) {\r
a -= 1;\r
}\r
\r
-void operator -- (inout vec2 v) {\r
+void __operator -- (inout vec2 v) {\r
--v.x, --v.y;\r
}\r
\r
-void operator -- (inout vec3 v) {\r
+void __operator -- (inout vec3 v) {\r
--v.x, --v.y, --v.z;\r
}\r
\r
-void operator -- (inout vec4 v) {\r
+void __operator -- (inout vec4 v) {\r
--v.x, --v.y, --v.z, --v.w;\r
}\r
\r
-void operator -- (inout ivec2 v) {\r
+void __operator -- (inout ivec2 v) {\r
--v.x, --v.y;\r
}\r
\r
-void operator -- (inout ivec3 v) {\r
+void __operator -- (inout ivec3 v) {\r
--v.x, --v.y, --v.z;\r
}\r
\r
-void operator -- (inout ivec4 v) {\r
+void __operator -- (inout ivec4 v) {\r
--v.x, --v.y, --v.z, --v.w;\r
}\r
\r
-void operator -- (inout mat2 m) {\r
+void __operator -- (inout mat2 m) {\r
--m[0], --m[1];\r
}\r
\r
-void operator -- (inout mat3 m) {\r
+void __operator -- (inout mat3 m) {\r
--m[0], --m[1], --m[2];\r
}\r
\r
-void operator -- (inout mat4 m) {\r
+void __operator -- (inout mat4 m) {\r
--m[0], --m[1], --m[2], --m[3];\r
}\r
\r
-void operator ++ (inout float a) {\r
+void __operator ++ (inout float a) {\r
a += 1.0;\r
}\r
\r
-void operator ++ (inout int a) {\r
+void __operator ++ (inout int a) {\r
a += 1;\r
}\r
\r
-void operator ++ (inout vec2 v) {\r
+void __operator ++ (inout vec2 v) {\r
++v.x, ++v.y;\r
}\r
\r
-void operator ++ (inout vec3 v) {\r
+void __operator ++ (inout vec3 v) {\r
++v.x, ++v.y, ++v.z;\r
}\r
\r
-void operator ++ (inout vec4 v) {\r
+void __operator ++ (inout vec4 v) {\r
++v.x, ++v.y, ++v.z, ++v.w;\r
}\r
\r
-void operator ++ (inout ivec2 v) {\r
+void __operator ++ (inout ivec2 v) {\r
++v.x, ++v.y;\r
}\r
\r
-void operator ++ (inout ivec3 v) {\r
+void __operator ++ (inout ivec3 v) {\r
++v.x, ++v.y, ++v.z;\r
}\r
\r
-void operator ++ (inout ivec4 v) {\r
+void __operator ++ (inout ivec4 v) {\r
++v.x, ++v.y, ++v.z, ++v.w;\r
}\r
\r
-void operator ++ (inout mat2 m) {\r
+void __operator ++ (inout mat2 m) {\r
++m[0], ++m[1];\r
}\r
\r
-void operator ++ (inout mat3 m) {\r
+void __operator ++ (inout mat3 m) {\r
++m[0], ++m[1], ++m[2];\r
}\r
\r
-void operator ++ (inout mat4 m) {\r
+void __operator ++ (inout mat4 m) {\r
++m[0], ++m[1], ++m[2], ++m[3];\r
}\r
\r
-float operator -- (inout float a, const int) {\r
+float __operator -- (inout float a, const int) {\r
const float c = a;\r
--a;\r
return c;\r
}\r
\r
-int operator -- (inout int a, const int) {\r
+int __operator -- (inout int a, const int) {\r
const int c = a;\r
--a;\r
return c;\r
}\r
\r
-vec2 operator -- (inout vec2 v, const int) {\r
+vec2 __operator -- (inout vec2 v, const int) {\r
return vec2 (v.x--, v.y--);\r
}\r
\r
-vec3 operator -- (inout vec3 v, const int) {\r
+vec3 __operator -- (inout vec3 v, const int) {\r
return vec3 (v.x--, v.y--, v.z--);\r
}\r
\r
-vec4 operator -- (inout vec4 v, const int) {\r
+vec4 __operator -- (inout vec4 v, const int) {\r
return vec4 (v.x--, v.y--, v.z--, v.w--);\r
}\r
\r
-ivec2 operator -- (inout ivec2 v, const int) {\r
+ivec2 __operator -- (inout ivec2 v, const int) {\r
return ivec2 (v.x--, v.y--);\r
}\r
\r
-ivec3 operator -- (inout ivec3 v, const int) {\r
+ivec3 __operator -- (inout ivec3 v, const int) {\r
return ivec3 (v.x--, v.y--, v.z--);\r
}\r
\r
-ivec4 operator -- (inout ivec4 v, const int) {\r
+ivec4 __operator -- (inout ivec4 v, const int) {\r
return ivec4 (v.x--, v.y--, v.z--, v.w--);\r
}\r
\r
-mat2 operator -- (inout mat2 m, const int) {\r
+mat2 __operator -- (inout mat2 m, const int) {\r
return mat2 (m[0]--, m[1]--);\r
}\r
\r
-mat3 operator -- (inout mat3 m, const int) {\r
+mat3 __operator -- (inout mat3 m, const int) {\r
return mat3 (m[0]--, m[1]--, m[2]--);\r
}\r
\r
-mat4 operator -- (inout mat4 m, const int) {\r
+mat4 __operator -- (inout mat4 m, const int) {\r
return mat4 (m[0]--, m[1]--, m[2]--, m[3]--);\r
}\r
\r
-float operator ++ (inout float a, const int) {\r
+float __operator ++ (inout float a, const int) {\r
const float c = a;\r
++a;\r
return c;\r
}\r
\r
-int operator ++ (inout int a, const int) {\r
+int __operator ++ (inout int a, const int) {\r
const int c = a;\r
++a;\r
return c;\r
}\r
\r
-vec2 operator ++ (inout vec2 v, const int) {\r
+vec2 __operator ++ (inout vec2 v, const int) {\r
return vec2 (v.x++, v.y++);\r
}\r
\r
-vec3 operator ++ (inout vec3 v, const int) {\r
+vec3 __operator ++ (inout vec3 v, const int) {\r
return vec3 (v.x++, v.y++, v.z++);\r
}\r
\r
-vec4 operator ++ (inout vec4 v, const int) {\r
+vec4 __operator ++ (inout vec4 v, const int) {\r
return vec4 (v.x++, v.y++, v.z++, v.w++);\r
}\r
\r
-ivec2 operator ++ (inout ivec2 v, const int) {\r
+ivec2 __operator ++ (inout ivec2 v, const int) {\r
return ivec2 (v.x++, v.y++);\r
}\r
\r
-ivec3 operator ++ (inout ivec3 v, const int) {\r
+ivec3 __operator ++ (inout ivec3 v, const int) {\r
return ivec3 (v.x++, v.y++, v.z++);\r
}\r
\r
-ivec4 operator ++ (inout ivec4 v, const int) {\r
+ivec4 __operator ++ (inout ivec4 v, const int) {\r
return ivec4 (v.x++, v.y++, v.z++, v.w++);\r
}\r
\r
-mat2 operator ++ (inout mat2 m, const int) {\r
+mat2 __operator ++ (inout mat2 m, const int) {\r
return mat2 (m[0]++, m[1]++);\r
}\r
\r
-mat3 operator ++ (inout mat3 m, const int) {\r
+mat3 __operator ++ (inout mat3 m, const int) {\r
return mat3 (m[0]++, m[1]++, m[2]++);\r
}\r
\r
-mat4 operator ++ (inout mat4 m, const int) {\r
+mat4 __operator ++ (inout mat4 m, const int) {\r
return mat4 (m[0]++, m[1]++, m[2]++, m[3]++);\r
}\r
\r
// greaterThan, and greaterThanEqual.\r
// \r
\r
-bool operator < (const float a, const float b) {\r
+bool __operator < (const float a, const float b) {\r
bool c;\r
__asm float_less c, a, b;\r
return c;\r
}\r
\r
-bool operator < (const int a, const int b) {\r
+bool __operator < (const int a, const int b) {\r
bool c;\r
__asm int_less c, a, b;\r
return c;\r
}\r
\r
-bool operator > (const float a, const float b) {\r
+bool __operator > (const float a, const float b) {\r
return b < a;\r
}\r
\r
-bool operator > (const int a, const int b) {\r
+bool __operator > (const int a, const int b) {\r
return b < a;\r
}\r
\r
-bool operator >= (const float a, const float b) {\r
+bool __operator >= (const float a, const float b) {\r
return a > b || a == b;\r
}\r
\r
-bool operator >= (const int a, const int b) {\r
+bool __operator >= (const int a, const int b) {\r
return a > b || a == b;\r
}\r
\r
-bool operator <= (const float a, const float b) {\r
+bool __operator <= (const float a, const float b) {\r
return a < b || a == b;\r
}\r
\r
-bool operator <= (const int a, const int b) {\r
+bool __operator <= (const int a, const int b) {\r
return a < b || a == b;\r
}\r
\r
// equality results for vectors, use the built-in functions equal and notEqual.\r
// \r
\r
-bool operator == (const float a, const float b) {\r
+bool __operator == (const float a, const float b) {\r
bool c;\r
__asm float_equal c, a, b;\r
return c;\r
}\r
\r
-bool operator == (const int a, const int b) {\r
+bool __operator == (const int a, const int b) {\r
bool c;\r
__asm int_equal c, a, b;\r
return c;\r
}\r
\r
-bool operator == (const bool a, const bool b) {\r
+bool __operator == (const bool a, const bool b) {\r
bool c;\r
__asm bool_equal c, a, b;\r
return c;\r
}\r
\r
-bool operator == (const vec2 v, const vec2 u) {\r
+bool __operator == (const vec2 v, const vec2 u) {\r
return v.x == u.x && v.y == u.y;\r
}\r
\r
-bool operator == (const vec3 v, const vec3 u) {\r
+bool __operator == (const vec3 v, const vec3 u) {\r
return v.x == u.x && v.y == u.y && v.z == u.z;\r
}\r
\r
-bool operator == (const vec4 v, const vec4 u) {\r
+bool __operator == (const vec4 v, const vec4 u) {\r
return v.x == u.x && v.y == u.y && v.z == u.z && v.w == u.w;\r
}\r
\r
-bool operator == (const ivec2 v, const ivec2 u) {\r
+bool __operator == (const ivec2 v, const ivec2 u) {\r
return v.x == u.x && v.y == u.y;\r
}\r
\r
-bool operator == (const ivec3 v, const ivec3 u) {\r
+bool __operator == (const ivec3 v, const ivec3 u) {\r
return v.x == u.x && v.y == u.y && v.z == u.z;\r
}\r
\r
-bool operator == (const ivec4 v, const ivec4 u) {\r
+bool __operator == (const ivec4 v, const ivec4 u) {\r
return v.x == u.x && v.y == u.y && v.z == u.z && v.w == u.w;\r
}\r
\r
-bool operator == (const bvec2 v, const bvec2 u) {\r
+bool __operator == (const bvec2 v, const bvec2 u) {\r
return v.x == u.x && v.y == u.y;\r
}\r
\r
-bool operator == (const bvec3 v, const bvec3 u) {\r
+bool __operator == (const bvec3 v, const bvec3 u) {\r
return v.x == u.x && v.y == u.y && v.z == u.z;\r
}\r
\r
-bool operator == (const bvec4 v, const bvec4 u) {\r
+bool __operator == (const bvec4 v, const bvec4 u) {\r
return v.x == u.x && v.y == u.y && v.z == u.z && v.w == u.w;\r
}\r
\r
-bool operator == (const mat2 m, const mat2 n) {\r
+bool __operator == (const mat2 m, const mat2 n) {\r
return m[0] == n[0] && m[1] == n[1];\r
}\r
\r
-bool operator == (const mat3 m, const mat3 n) {\r
+bool __operator == (const mat3 m, const mat3 n) {\r
return m[0] == n[0] && m[1] == n[1] && m[2] == n[2];\r
}\r
\r
-bool operator == (const mat4 m, const mat4 n) {\r
+bool __operator == (const mat4 m, const mat4 n) {\r
return m[0] == n[0] && m[1] == n[1] && m[2] == n[2] && m[3] == n[3];\r
}\r
\r
-bool operator != (const float a, const float b) {\r
+bool __operator != (const float a, const float b) {\r
return !(a == b);\r
}\r
\r
-bool operator != (const int a, const int b) {\r
+bool __operator != (const int a, const int b) {\r
return !(a == b);\r
}\r
\r
-bool operator != (const bool a, const bool b) {\r
+bool __operator != (const bool a, const bool b) {\r
return !(a == b);\r
}\r
\r
-bool operator != (const vec2 v, const vec2 u) {\r
+bool __operator != (const vec2 v, const vec2 u) {\r
return v.x != u.x || v.y != u.y;\r
}\r
\r
-bool operator != (const vec3 v, const vec3 u) {\r
+bool __operator != (const vec3 v, const vec3 u) {\r
return v.x != u.x || v.y != u.y || v.z != u.z;\r
}\r
\r
-bool operator != (const vec4 v, const vec4 u) {\r
+bool __operator != (const vec4 v, const vec4 u) {\r
return v.x != u.x || v.y != u.y || v.z != u.z || v.w != u.w;\r
}\r
\r
-bool operator != (const ivec2 v, const ivec2 u) {\r
+bool __operator != (const ivec2 v, const ivec2 u) {\r
return v.x != u.x || v.y != u.y;\r
}\r
\r
-bool operator != (const ivec3 v, const ivec3 u) {\r
+bool __operator != (const ivec3 v, const ivec3 u) {\r
return v.x != u.x || v.y != u.y || v.z != u.z;\r
}\r
\r
-bool operator != (const ivec4 v, const ivec4 u) {\r
+bool __operator != (const ivec4 v, const ivec4 u) {\r
return v.x != u.x || v.y != u.y || v.z != u.z || v.w != u.w;\r
}\r
\r
-bool operator != (const bvec2 v, const bvec2 u) {\r
+bool __operator != (const bvec2 v, const bvec2 u) {\r
return v.x != u.x || v.y != u.y;\r
}\r
\r
-bool operator != (const bvec3 v, const bvec3 u) {\r
+bool __operator != (const bvec3 v, const bvec3 u) {\r
return v.x != u.x || v.y != u.y || v.z != u.z;\r
}\r
\r
-bool operator != (const bvec4 v, const bvec4 u) {\r
+bool __operator != (const bvec4 v, const bvec4 u) {\r
return v.x != u.x || v.y != u.y || v.z != u.z || v.w != u.w;\r
}\r
\r
-bool operator != (const mat2 m, const mat2 n) {\r
+bool __operator != (const mat2 m, const mat2 n) {\r
return m[0] != n[0] || m[1] != n[1];\r
}\r
\r
-bool operator != (const mat3 m, const mat3 n) {\r
+bool __operator != (const mat3 m, const mat3 n) {\r
return m[0] != n[0] || m[1] != n[1] || m[2] != n[2];\r
}\r
\r
-bool operator != (const mat4 m, const mat4 n) {\r
+bool __operator != (const mat4 m, const mat4 n) {\r
return m[0] != n[0] || m[1] != n[1] || m[2] != n[2] || m[3] != n[3];\r
}\r
\r
// (^^) will always evaluate both operands.\r
// \r
\r
-bool operator ^^ (const bool a, const bool b) {\r
+bool __operator ^^ (const bool a, const bool b) {\r
return a != b;\r
}\r
\r
// \r
// [These operators are handled internally by the compiler:]\r
// \r
-// bool operator && (bool a, bool b) {\r
+// bool __operator && (bool a, bool b) {\r
// return a ? b : false;\r
// }\r
-// bool operator || (bool a, bool b) {\r
+// bool __operator || (bool a, bool b) {\r
// return a ? true : b;\r
// }\r
// \r
// Boolean expression. To operate on a vector, use the built-in function not.\r
// \r
\r
-bool operator ! (const bool a) {\r
+bool __operator ! (const bool a) {\r
return a == false;\r
}\r
\r