added math.log2() and math.log2w()

This commit is contained in:
Irmen de Jong
2023-09-01 00:42:15 +02:00
parent 2dc2429735
commit 28bf0b61ce
4 changed files with 73 additions and 0 deletions
+5
View File
@@ -343,6 +343,11 @@ Various 8-bit integer trig functions that use lookup tables to quickly calculate
Usually a custom lookup table is the way to go if your application needs these,
but perhaps the provided ones can be of service too.
``log2 (ubyte v)``
Returns the 2-Log of the byte value v.
``log2w (uword v)``
Returns the 2-Log of the word value v.
``rnd ()``
Returns next random byte 0-255 from the pseudo-RNG sequence.