From a performance (nanosecond critical) point of view, would there be an advantage in creating such a table (sin, cos) for non-precise operations?
I'm thinking about creating, for example, an array with 36000 elements:
Code:
Dim cosTable() As Double = _
Array As Double( _
..., _
..., _
...)
'Get's the angle's (degrees) cosine
Sub getCosD(angle As Double) As Double
NormalizeAngleTo_0_360(angle)
Return cosTable(angle * 1000)
End Sub
from B4X Community - Android, iOS, desktop, server and IoT programming tools http://ift.tt/2aWc4NQ
via IFTTT
Aucun commentaire:
Enregistrer un commentaire