Skip to content

Commit

Permalink
Merge pull request #7 from Ferix9288/fix_fast_cos
Browse files Browse the repository at this point in the history
Fix FastCos
  • Loading branch information
smira authored Jun 27, 2019
2 parents 065780e + 3a89fc2 commit b2d9c6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion distance.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func FastSine(x float64) float64 {
// FastCos calculates cosinus from sinus
func FastCos(x float64) float64 {
x += math.Pi / 2.0
if x > math.Pi {
for x > math.Pi {
x -= 2 * math.Pi
}

Expand Down

0 comments on commit b2d9c6d

Please sign in to comment.