diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2021-11-20 12:22:38 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-20 12:22:38 +0000 |
| commit | d424c84bf983af19b646fe2b932a04a40e451bfb (patch) | |
| tree | 85d9baa216d1a370a0cd9c17426267777bcaf5bb | |
| parent | daebaa8b5027731680037a12ad3e63936dc5aef2 (diff) | |
| parent | 56d2bbc5b9509ecb10c8e700afc5cb14a5e23d8b (diff) | |
Merge pull request #1322 from Gaunsessa/master
Add darwin support for glfw and re-add ln for js.
| -rw-r--r-- | core/math/math_basic_js.odin | 14 | ||||
| -rw-r--r-- | vendor/glfw/bindings/bindings.odin | 1 |
2 files changed, 14 insertions, 1 deletions
diff --git a/core/math/math_basic_js.odin b/core/math/math_basic_js.odin index 06c8b636d..ec572f898 100644 --- a/core/math/math_basic_js.odin +++ b/core/math/math_basic_js.odin @@ -39,4 +39,16 @@ cos_f32 :: proc "c" (θ: f32) -> f32 { return f32(cos_f64(f64(θ pow_f32 :: proc "c" (x, power: f32) -> f32 { return f32(pow_f64(f64(x), f64(power))) } fmuladd_f32 :: proc "c" (a, b, c: f32) -> f32 { return f32(fmuladd_f64(f64(a), f64(a), f64(c))) } ln_f32 :: proc "c" (x: f32) -> f32 { return f32(ln_f64(f64(x))) } -exp_f32 :: proc "c" (x: f32) -> f32 { return f32(exp_f64(f64(x))) }
\ No newline at end of file +exp_f32 :: proc "c" (x: f32) -> f32 { return f32(exp_f64(f64(x))) } + +ln_f16le :: proc "contextless" (x: f16le) -> f16le { return #force_inline f16le(ln_f64(f64(x))) } +ln_f16be :: proc "contextless" (x: f16be) -> f16be { return #force_inline f16be(ln_f64(f64(x))) } +ln_f32le :: proc "contextless" (x: f32le) -> f32le { return #force_inline f32le(ln_f64(f64(x))) } +ln_f32be :: proc "contextless" (x: f32be) -> f32be { return #force_inline f32be(ln_f64(f64(x))) } +ln_f64le :: proc "contextless" (x: f64le) -> f64le { return #force_inline f64le(ln_f64(f64(x))) } +ln_f64be :: proc "contextless" (x: f64be) -> f64be { return #force_inline f64be(ln_f64(f64(x))) } +ln :: proc{ + ln_f16, ln_f16le, ln_f16be, + ln_f32, ln_f32le, ln_f32be, + ln_f64, ln_f64le, ln_f64be, +} diff --git a/vendor/glfw/bindings/bindings.odin b/vendor/glfw/bindings/bindings.odin index 06b5f5b32..84905f603 100644 --- a/vendor/glfw/bindings/bindings.odin +++ b/vendor/glfw/bindings/bindings.odin @@ -4,6 +4,7 @@ import "core:c" import vk "vendor:vulkan" when ODIN_OS == "linux" { foreign import glfw "system:glfw" } // TODO: Add the billion-or-so static libs to link to in linux +when ODIN_OS == "darwin" { foreign import glfw "system:glfw" } when ODIN_OS == "windows" { foreign import glfw { "../lib/glfw3_mt.lib", |