From fdf0205c98885c97d6e41b6e3dff738a826f7e31 Mon Sep 17 00:00:00 2001 From: unittensor Date: Sat, 20 Jan 2024 22:28:07 -0500 Subject: [PATCH] Vector test and the test folder --- tests/Vector.lua | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/Vector.lua diff --git a/tests/Vector.lua b/tests/Vector.lua new file mode 100644 index 0000000..26a2cc8 --- /dev/null +++ b/tests/Vector.lua @@ -0,0 +1,6 @@ +type f64 = number +type vec3 = (x: f64, y: f64, z: f64) -> {x: f64, y: f64, z: f64} +local Vector3: vec3 = Vector3 + +local v3 = Vector3(-10, 30, 50) +print((`{("\n"):rep(3)} x=%d,y=%d,z=%d {("\n"):rep(3)}`):format(v3.x, v3.y, v3.z)) \ No newline at end of file