diff options
| author | gingerBill <bill@gingerbill.org> | 2021-08-09 20:13:58 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-08-09 20:13:58 +0100 |
| commit | 193fd0eecbeb5bdcdbd1173ea65f5ae8963705bb (patch) | |
| tree | 3254b7c30b2c1f3b817b0787137bfddea6261446 /examples | |
| parent | 01f431b01fea18b0844d0475839c68426e95fd2c (diff) | |
Correct and improve type inference for swizzling expressions
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/demo/demo.odin | 9 |
1 files changed, 9 insertions, 0 deletions
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; } |