Added Pow{,32}.

This commit is contained in:
Sander Schobers 2020-05-09 08:03:44 +02:00
parent a77de45eba
commit 52494022f6

10
math.go
View File

@ -72,6 +72,16 @@ func NaN32() float32 {
return float32(NaN()) return float32(NaN())
} }
// Pow returns the power e of base b.
func Pow(b, e float64) float64 {
return math.Pow(b, e)
}
// Pow32 returns the power e of base b.
func Pow32(b, e float32) float32 {
return float32(Pow(float64(b), float64(e)))
}
// Round rounds to the nearest integer. // Round rounds to the nearest integer.
func Round(f float64) float64 { func Round(f float64) float64 {
return math.Round(f) return math.Round(f)