added Abs
This commit is contained in:
parent
82073f40ae
commit
799f5431ac
4
math.go
4
math.go
@ -5,3 +5,7 @@ import "math"
|
||||
func Pow[N Number](x, y N) N {
|
||||
return N(math.Pow(float64(x), float64(y)))
|
||||
}
|
||||
|
||||
func Abs[N Number](v N) N {
|
||||
return N(math.Abs(float64(v)))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user