diff options
| author | Zachary Pierson <zacpiersonhehe@gmail.com> | 2017-03-30 00:26:46 -0500 |
|---|---|---|
| committer | Zachary Pierson <zacpiersonhehe@gmail.com> | 2017-03-30 00:26:46 -0500 |
| commit | 1349aa6f2cfc63ace0382a8dd6b346f24e861ea9 (patch) | |
| tree | 55b6fb23ecfb86e3c474bfd4bbc8e9bb5c78f986 /core/math.odin | |
| parent | 7a28827602f29f0e9485ca6617daf316635802df (diff) | |
| parent | a75ccb6fbc529d2fee00f9b456ca7c0c830548ee (diff) | |
Merge https://github.com/gingerBill/Odin, cleaned up a bit, fixed the object file version message on macOS
Diffstat (limited to 'core/math.odin')
| -rw-r--r-- | core/math.odin | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/math.odin b/core/math.odin index 7e1e0bb07..059f3e338 100644 --- a/core/math.odin +++ b/core/math.odin @@ -36,6 +36,10 @@ cos :: proc(x: f64) -> f64 #foreign __llvm_core "llvm.cos.f64"; tan :: proc(x: f32) -> f32 #inline { return sin(x)/cos(x); } tan :: proc(x: f64) -> f64 #inline { return sin(x)/cos(x); } +pow :: proc(x, power: f32) -> f32 #foreign __llvm_core "llvm.pow.f32"; +pow :: proc(x, power: f64) -> f64 #foreign __llvm_core "llvm.pow.f64"; + + lerp :: proc(a, b, t: f32) -> f32 { return a*(1-t) + b*t; } lerp :: proc(a, b, t: f64) -> f64 { return a*(1-t) + b*t; } |