1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-08 14:42:27 +08:00

doc: add go playground demo

This commit is contained in:
dudaodong
2023-06-01 14:11:57 +08:00
parent 286a187942
commit cbf8cfdffa
8 changed files with 43 additions and 14 deletions

View File

@@ -303,7 +303,7 @@ func lcm[T constraints.Integer](a, b T) T {
}
// Cos returns the cosine of the radian argument.
// Play: todo
// Play: https://go.dev/play/p/Sm89LoIfvFq
func Cos(radian float64, precision ...int) float64 {
t := 1.0 / (2.0 * math.Pi)
radian *= t
@@ -319,7 +319,7 @@ func Cos(radian float64, precision ...int) float64 {
}
// Cos returns the sine of the radian argument.
// Play: todo
// Play: https://go.dev/play/p/TWMQlMywDsP
func Sin(radian float64, precision ...int) float64 {
return Cos((math.Pi / 2) - radian)
}