From 34150385d8db82ab8de7eeba06c51a43ba59ec6e Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Mon, 30 Jan 2017 22:31:34 +0000 Subject: Change vector memory layout and operations; `for in` vector. --- code/demo.odin | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'code') diff --git a/code/demo.odin b/code/demo.odin index 21cfb6f63..61516e5b7 100644 --- a/code/demo.odin +++ b/code/demo.odin @@ -10,4 +10,20 @@ main :: proc() { fmt.print(p); } fmt.println(); + + { + Vec3 :: [vector 3]f32; + + x := Vec3{1, 2, 3}; + y := Vec3{4, 5, 6}; + fmt.println(x < y); + fmt.println(x + y); + fmt.println(x - y); + fmt.println(x * y); + fmt.println(x / y); + + for i in x { + fmt.println(i); + } + } } -- cgit v1.2.3