From 952832577722b8700df30a63e25b7ae6971c8997 Mon Sep 17 00:00:00 2001 From: Jesse Stiller Date: Thu, 27 Apr 2023 20:49:59 +1000 Subject: [PATCH] linalg/extended radians and degrees fixed Renamed them to `to_degrees` and `to_radians` to match the same scalar functions in math--plus it helps clarify exactly what they do. And fixed a bug where the array overloads weren't being indexed. --- core/math/linalg/extended.odin | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/math/linalg/extended.odin b/core/math/linalg/extended.odin index 9dee12eb9..22368b70c 100644 --- a/core/math/linalg/extended.odin +++ b/core/math/linalg/extended.odin @@ -3,20 +3,21 @@ package linalg import "core:builtin" import "core:math" -radians :: proc(degrees: $T) -> (out: T) where IS_NUMERIC(ELEM_TYPE(T)) { +to_radians :: proc(degrees: $T) -> (out: T) where IS_NUMERIC(ELEM_TYPE(T)) { when IS_ARRAY(T) { for i in 0.. (out: T) where IS_NUMERIC(ELEM_TYPE(T)) { + +to_degrees :: proc(radians: $T) -> (out: T) where IS_NUMERIC(ELEM_TYPE(T)) { when IS_ARRAY(T) { for i in 0..