mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 05:08:14 +00:00
Remove usage of do in core library
This commit is contained in:
@@ -154,7 +154,9 @@ projection :: proc(x, normal: $T/[$N]$E) -> T where IS_NUMERIC(E) {
|
||||
}
|
||||
|
||||
identity :: proc($T: typeid/[$N][N]$E) -> (m: T) {
|
||||
for i in 0..<N do m[i][i] = E(1);
|
||||
for i in 0..<N {
|
||||
m[i][i] = E(1);
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
|
||||
@@ -115,8 +115,8 @@ vector4_linear_to_srgb :: proc(col: Vector4) -> Vector4 {
|
||||
vector4_hsl_to_rgb :: proc(h, s, l: Float, a: Float = 1) -> Vector4 {
|
||||
hue_to_rgb :: proc(p, q, t: Float) -> Float {
|
||||
t := t;
|
||||
if t < 0 do t += 1;
|
||||
if t > 1 do t -= 1;
|
||||
if t < 0 { t += 1; }
|
||||
if t > 1 { t -= 1; }
|
||||
switch {
|
||||
case t < 1.0/6.0: return p + (q - p) * 6.0 * t;
|
||||
case t < 1.0/2.0: return q;
|
||||
|
||||
Reference in New Issue
Block a user