diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-03-27 20:32:36 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-03-27 20:32:36 +0100 |
| commit | a75ccb6fbc529d2fee00f9b456ca7c0c830548ee (patch) | |
| tree | cbe963045fb415f9470c0a84fbdbbe6e75f350ff /core/math.odin | |
| parent | 188b290dd50664aa8a89955ac2ab7dbebf7a653d (diff) | |
v0.1.3v0.1.3
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 dc5b7ba76..6ba540ac0 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; } |