[1mdiff --git a/include/the_Foundation/math_sse.h b/include/the_Foundation/math_sse.h[m
[1mindex 8980aff..84427fa 100644[m
[1m--- a/include/the_Foundation/math_sse.h[m
[1m+++ b/include/the_Foundation/math_sse.h[m
[36m@@ -266,6 +266,11 @@[m [miLocalDef iFloatVec3 values_F3(const iFloat3 d) {[m
[m
#define iFloat3Shuffle3(d, X, Y, Z) (iFloat3){ _mm_shuffle_ps((d).m, (d).m, _MM_SHUFFLE(Z, Y, X, 0)) }[m
[m
[32m+[m[32miLocalDef iFloat3 xy_F3(const iFloat3 d) {[m
[32m+[m[32m __m128 t = _mm_move_ss(d.m, _mm_set_ss(0));[m
[32m+[m[32m return (iFloat3){ _mm_shuffle_ps(t, t, _MM_SHUFFLE(0, 2, 1, 0)) };[m
[32m+[m[32m}[m
[32m+[m
iLocalDef iFloat3 yzx_F3(const iFloat3 d) {[m
return iFloat3Shuffle3(d, 2, 3, 1);[m
}[m
[1mdiff --git a/tests/t_math.c b/tests/t_math.c[m
[1mindex fd44355..ad001bf 100644[m
[1m--- a/tests/t_math.c[m
[1m+++ b/tests/t_math.c[m
[36m@@ -125,7 +125,7 @@[m [mint main(int argc, char **argv) {[m
iMaxf(3.f, 5.f),[m
iClampf(1, 3, 5), iClampf(7, 3, 5), iClampf(4, 3, 5));[m
}[m
[31m- /* Basic vectoring. */ {[m
[32m+[m[32m /* Basic vectors. */ {[m
print_("zero", zero_F4());[m
print_("init4", init_F4(1, 2, 3, 4)); {[m
float f[4];[m
[36m@@ -147,7 +147,8 @@[m [mint main(int argc, char **argv) {[m
length_F3(init_F3(0, -2, 0)),[m
length_F3(init_F3(0, 0, -2)));[m
printf("Sum: F3: %f F4: %f\n", sum_F3(init_F3(1, 2, 3)), sum_F4(init_F4(1, 2, 3, 4)));[m
[31m- print_("init3", init_F3(2, 3, 4)); {[m
[32m+[m[32m print_("init3", init_F3(2, 3, 4));[m
[32m+[m[32m print_("xy_F3", xy_F3(init_F3(2, 3, 4))); {[m
iFloat3 v3 = init_F3(1, 1, 1);[m
setX_F3(&v3, 2);[m
print_("set x", v3);[m
text/plain
This content has been proxied by September (ba2dc).