-
Notifications
You must be signed in to change notification settings - Fork 9
/
f32math.go
46 lines (34 loc) · 844 Bytes
/
f32math.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (c) 2012 James Helferty
// All rights reserved.
package vectormath
import "math"
func max(a, b float32) float32 {
return float32(math.Max(float64(a), float64(b)))
}
func min(a, b float32) float32 {
return float32(math.Min(float64(a), float64(b)))
}
func abs(a float32) float32 {
return float32(math.Abs(float64(a)))
}
func sqrt(a float32) float32 {
return float32(math.Sqrt(float64(a)))
}
func sin(a float32) float32 {
return float32(math.Sin(float64(a)))
}
func cos(a float32) float32 {
return float32(math.Cos(float64(a)))
}
func tan(a float32) float32 {
return float32(math.Tan(float64(a)))
}
func asin(a float32) float32 {
return float32(math.Asin(float64(a)))
}
func acos(a float32) float32 {
return float32(math.Acos(float64(a)))
}
func atan(a float32) float32 {
return float32(math.Atan(float64(a)))
}