Documentation
¶
Overview ¶
Package mathutil implements some functions for math calculation.
Index ¶
- func AngleToRadian(angle float64) float64
- func Exponent(x, n int64) int64
- func Factorial(x uint) uint
- func Fibonacci(first, second, n int) int
- func IsPrime(n int) bool
- func Percent(val, total float64, n int) float64
- func PointDistance(x1, y1, x2, y2 float64) float64
- func RadianToAngle(radian float64) float64
- func RoundToFloat(x float64, n int) float64
- func RoundToString(x float64, n int) string
- func TruncRound(x float64, n int) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AngleToRadian ¶ added in v1.3.8
AngleToRadian converts angle value to radian value.
func PointDistance ¶ added in v1.3.8
PointDistance get two points distance.
func RadianToAngle ¶ added in v1.3.8
RadianToAngle converts radian value to angle value.
func RoundToFloat ¶
RoundToFloat round up to n decimal places
func RoundToString ¶
RoundToString round up to n decimal places
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.