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:
Something like this...
I'm thinking about creating, for example, an array with 36000 elements:
B4X:
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 * 100)
End Sub
Something like this...
Last edited: