Correct and improve type inference for swizzling expressions

This commit is contained in:
gingerBill
2021-08-09 20:13:58 +01:00
parent 01f431b01f
commit 193fd0eecb
3 changed files with 35 additions and 31 deletions

View File

@@ -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;
}