openMSX
|
Go to the source code of this file.
Functions | |
template<int N, typename T > | |
void | print (const vecN< N, T > &x) |
template<typename T > | |
bool | approxEq (T x, T y) |
template<int N, typename T > | |
bool | approxEq (const vecN< N, T > &x, const vecN< N, T > &y) |
int | main () |
void | test_constr (vec4 &z) |
void | test_constr (float x, vec4 &z) |
void | test_constr (float a, float b, float c, float d, vec4 &z) |
void | test_change0 (float x, vec4 &z) |
void | test_change2 (float x, vec4 &z) |
void | test_extract0 (const vec4 &x, float &z) |
void | test_extract2 (const vec4 &x, float &z) |
bool | test_equal (const vec4 &x, const vec4 &y) |
bool | test_not_equal (const vec4 &x, const vec4 &y) |
void | test_add (const vec4 &x, const vec4 &y, vec4 &z) |
void | test_add (vec4 &x, const vec4 &y) |
void | test_negate (const vec4 &x, vec4 &y) |
void | test_mul (const vec4 &x, const vec4 &y, vec4 &z) |
void | test_mul (float x, const vec4 &y, vec4 &z) |
void | test_div (const vec4 &x, const vec4 &y, vec4 &z) |
void | test_div (float x, const vec4 &y, vec4 &z) |
void | test_div (const vec4 &x, float y, vec4 &z) |
void | test_sum (const vec4 &x, float &y) |
void | test_sum_broadcast (const vec4 &x, vec4 &y) |
void | test_dot (const vec4 &x, const vec4 &y, float &z) |
void | test_dot_broadcast (const vec4 &x, const vec4 &y, vec4 &z) |
void | test_length2 (const vec4 &x, float &y) |
void | test_length (const vec4 &x, float &y) |
void | test_normalize (const vec4 &x, vec4 &y) |
void | test_recip (const vec4 &x, vec4 &y) |
void | test_constr (vec3 &z) |
void | test_constr (float x, vec3 &z) |
void | test_constr (float a, float b, float c, vec3 &z) |
void | test_constr (vec4 x, vec3 &y) |
void | test_change0 (float x, vec3 &z) |
void | test_change2 (float x, vec3 &z) |
void | test_extract0 (const vec3 &x, float &z) |
void | test_extract2 (const vec3 &x, float &z) |
bool | test_equal (const vec3 &x, const vec3 &y) |
bool | test_not_equal (const vec3 &x, const vec3 &y) |
void | test_add (const vec3 &x, const vec3 &y, vec3 &z) |
void | test_add (vec3 &x, const vec3 &y) |
void | test_negate (const vec3 &x, vec3 &y) |
void | test_mul (const vec3 &x, const vec3 &y, vec3 &z) |
void | test_mul (float x, const vec3 &y, vec3 &z) |
void | test_div (const vec3 &x, const vec3 &y, vec3 &z) |
void | test_div (float x, const vec3 &y, vec3 &z) |
void | test_div (const vec3 &x, float y, vec3 &z) |
void | test_min (const vec3 &x, const vec3 &y, vec3 &z) |
void | test_min (const vec4 &x, const vec4 &y, vec4 &z) |
void | test_clamp (const vec3 &x, const vec3 &y, const vec3 &z, vec3 &w) |
void | test_clamp (const vec4 &x, const vec4 &y, const vec4 &z, vec4 &w) |
void | test_clamp (const vec3 &x, float y, float z, vec3 &w) |
void | test_clamp (const vec4 &x, float y, float z, vec4 &w) |
void | test_clamp (const vec4 &x, vec4 &y) |
void | test_sum (const vec3 &x, float &y) |
void | test_dot (const vec3 &x, const vec3 &y, float &z) |
void | test_length2 (const vec3 &x, float &y) |
void | test_length (const vec3 &x, float &y) |
void | test_normalize (const vec3 &x, vec3 &y) |
void | test_round (const vec4 &x, ivec4 &y) |
void | test_trunc (const vec4 &x, ivec4 &y) |
bool approxEq | ( | T | x, |
T | y | ||
) |
Definition at line 18 of file gl_vec_Test.cc.
Referenced by main().
Definition at line 23 of file gl_vec_Test.cc.
int main | ( | ) |
Definition at line 28 of file gl_vec_Test.cc.
References approxEq(), gl::clamp(), gl::cross(), gl::degrees(), gl::dot(), gl::dot_broadcast(), gl::length(), gl::length2(), M_PI, gl::max(), gl::min(), gl::normalize(), gl::radians(), gl::recip(), gl::round(), gl::rsqrt(), gl::sum(), gl::sum_broadcast(), and gl::trunc().
void print | ( | const vecN< N, T > & | x | ) |
Definition at line 8 of file gl_vec_Test.cc.
Definition at line 506 of file gl_vec_Test.cc.
Definition at line 510 of file gl_vec_Test.cc.
Definition at line 625 of file gl_vec_Test.cc.
Definition at line 629 of file gl_vec_Test.cc.
void test_change0 | ( | float | x, |
vec4 & | z | ||
) |
Definition at line 479 of file gl_vec_Test.cc.
void test_change0 | ( | float | x, |
vec3 & | z | ||
) |
Definition at line 598 of file gl_vec_Test.cc.
void test_change2 | ( | float | x, |
vec4 & | z | ||
) |
Definition at line 483 of file gl_vec_Test.cc.
void test_change2 | ( | float | x, |
vec3 & | z | ||
) |
Definition at line 602 of file gl_vec_Test.cc.
Definition at line 671 of file gl_vec_Test.cc.
Definition at line 676 of file gl_vec_Test.cc.
Definition at line 681 of file gl_vec_Test.cc.
Definition at line 686 of file gl_vec_Test.cc.
Definition at line 691 of file gl_vec_Test.cc.
void test_constr | ( | vec4 & | z | ) |
Definition at line 466 of file gl_vec_Test.cc.
void test_constr | ( | float | x, |
vec4 & | z | ||
) |
Definition at line 470 of file gl_vec_Test.cc.
void test_constr | ( | float | a, |
float | b, | ||
float | c, | ||
float | d, | ||
vec4 & | z | ||
) |
Definition at line 474 of file gl_vec_Test.cc.
void test_constr | ( | vec3 & | z | ) |
Definition at line 581 of file gl_vec_Test.cc.
void test_constr | ( | float | x, |
vec3 & | z | ||
) |
Definition at line 585 of file gl_vec_Test.cc.
void test_constr | ( | float | a, |
float | b, | ||
float | c, | ||
vec3 & | z | ||
) |
Definition at line 589 of file gl_vec_Test.cc.
Definition at line 593 of file gl_vec_Test.cc.
Definition at line 529 of file gl_vec_Test.cc.
Definition at line 533 of file gl_vec_Test.cc.
Definition at line 537 of file gl_vec_Test.cc.
Definition at line 648 of file gl_vec_Test.cc.
Definition at line 652 of file gl_vec_Test.cc.
Definition at line 656 of file gl_vec_Test.cc.
Definition at line 551 of file gl_vec_Test.cc.
Definition at line 701 of file gl_vec_Test.cc.
Definition at line 555 of file gl_vec_Test.cc.
Definition at line 497 of file gl_vec_Test.cc.
Definition at line 616 of file gl_vec_Test.cc.
void test_extract0 | ( | const vec4 & | x, |
float & | z | ||
) |
Definition at line 488 of file gl_vec_Test.cc.
void test_extract0 | ( | const vec3 & | x, |
float & | z | ||
) |
Definition at line 607 of file gl_vec_Test.cc.
void test_extract2 | ( | const vec4 & | x, |
float & | z | ||
) |
Definition at line 492 of file gl_vec_Test.cc.
void test_extract2 | ( | const vec3 & | x, |
float & | z | ||
) |
Definition at line 611 of file gl_vec_Test.cc.
void test_length | ( | const vec4 & | x, |
float & | y | ||
) |
Definition at line 565 of file gl_vec_Test.cc.
void test_length | ( | const vec3 & | x, |
float & | y | ||
) |
Definition at line 711 of file gl_vec_Test.cc.
void test_length2 | ( | const vec4 & | x, |
float & | y | ||
) |
Definition at line 560 of file gl_vec_Test.cc.
void test_length2 | ( | const vec3 & | x, |
float & | y | ||
) |
Definition at line 706 of file gl_vec_Test.cc.
Definition at line 661 of file gl_vec_Test.cc.
Definition at line 666 of file gl_vec_Test.cc.
Definition at line 520 of file gl_vec_Test.cc.
Definition at line 524 of file gl_vec_Test.cc.
Definition at line 639 of file gl_vec_Test.cc.
Definition at line 643 of file gl_vec_Test.cc.
Definition at line 515 of file gl_vec_Test.cc.
Definition at line 634 of file gl_vec_Test.cc.
Definition at line 570 of file gl_vec_Test.cc.
Definition at line 716 of file gl_vec_Test.cc.
Definition at line 501 of file gl_vec_Test.cc.
Definition at line 620 of file gl_vec_Test.cc.
Definition at line 575 of file gl_vec_Test.cc.
Definition at line 721 of file gl_vec_Test.cc.
void test_sum | ( | const vec4 & | x, |
float & | y | ||
) |
Definition at line 542 of file gl_vec_Test.cc.
void test_sum | ( | const vec3 & | x, |
float & | y | ||
) |
Definition at line 696 of file gl_vec_Test.cc.
Definition at line 546 of file gl_vec_Test.cc.
Definition at line 725 of file gl_vec_Test.cc.