aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/demo/demo.odin9
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;
}