Skip to content

Commit b2d9c6d

Browse files
authored
Merge pull request #7 from Ferix9288/fix_fast_cos
Fix FastCos
2 parents 065780e + 3a89fc2 commit b2d9c6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

distance.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func FastSine(x float64) float64 {
4545
// FastCos calculates cosinus from sinus
4646
func FastCos(x float64) float64 {
4747
x += math.Pi / 2.0
48-
if x > math.Pi {
48+
for x > math.Pi {
4949
x -= 2 * math.Pi
5050
}
5151

0 commit comments

Comments
 (0)