Box the compass: Difference between revisions

Content added Content deleted
(→‎{{header|Visual Basic .NET}}: Added implementation)
m (→‎{{header|Visual Basic .NET}}: Changed GetPoint to use "Mod 32" instead of subtraction of 32.)
Line 189: Line 189:
Private Function GetPoint(ByVal Degrees As Double) As String
Private Function GetPoint(ByVal Degrees As Double) As String
Dim testD As Double = (Degrees / 11.25) + 0.5
Dim testD As Double = (Degrees / 11.25) + 0.5
If testD > 32 Then testD -= 32
Return _points(CInt(Math.Floor(testD Mod 32)))
Return _points(CInt(Math.Floor(testD)))
End Function
End Function
End Module
End Module