From 193fd0eecbeb5bdcdbd1173ea65f5ae8963705bb Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 9 Aug 2021 20:13:58 +0100 Subject: Correct and improve type inference for swizzling expressions --- examples/demo/demo.odin | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'examples') diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin index 6431f1d7a..2590fdc01 100644 --- a/examples/demo/demo.odin +++ b/examples/demo/demo.odin @@ -8,6 +8,9 @@ import "core:time" import "core:reflect" import "core:runtime" import "intrinsics" +import "core:encoding/json" + +_ :: json; /* The Odin programming language is fast, concise, readable, pragmatic and open sourced. @@ -1203,6 +1206,12 @@ array_programming :: proc() { return i - j; } + cross_shorter :: proc(a, b: Vector3) -> Vector3 { + i := a.yzx * b.zxy; + j := a.zxy * b.yzx; + return i - j; + } + blah :: proc(a: Vector3) -> f32 { return a.x + a.y + a.z; } -- cgit v1.2.3