so... jai :D

This commit is contained in:
agra
2026-02-04 01:34:30 +02:00
commit 55fc5790e4
60 changed files with 15876 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#import "modules/std.sx";
math :: #import "modules/std/math.sx";
vec3 :: (x:f32, y:f32, z:f32) -> Vector(3,f32) {
.[x, y, z];
}
main :: () {
a := vec3(1, 0, 0);
b := vec3(0, 1, 0);
// dot product
d := math.dot(a, b);
print("dot: {}\n", d);
// cross product
cr := math.cross(a, b);
print("cross: {}\n", cr);
// length
v := vec3(3, 4, 0);
len := math.length(v);
print("length: {}\n", len);
// normalize
n := math.normalize(v);
print("norm: {}\n", n);
}