1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-07 22:22:29 +08:00

feat: add Log

This commit is contained in:
dudaodong
2023-06-13 14:59:30 +08:00
parent f3382ceac9
commit 4bc43f3278
4 changed files with 112 additions and 27 deletions

View File

@@ -189,3 +189,8 @@ func Cos(radian float64, precision ...int) float64 {
func Sin(radian float64, precision ...int) float64 {
return Cos((math.Pi / 2) - radian)
}
// Log returns the logarithm of base n.
func Log(n, base float64) float64 {
return math.Log(n) / math.Log(base)
}