mirror of
https://github.com/irmen/prog8.git
synced 2025-07-24 20:24:09 +00:00
moved all *integer* builtin trig functions (sin8u, cos8u etc) as regular asmsubs in math module
This commit is contained in:
@@ -745,35 +745,9 @@ ceil(x)
|
||||
Rounds the floating point up to an integer towards positive infinity.
|
||||
|
||||
cos(x)
|
||||
Cosine. (floating point version)
|
||||
|
||||
cos8u(x)
|
||||
Fast 8-bit ubyte cosine of angle 0..255, result is in range 0..255
|
||||
|
||||
cos8(x)
|
||||
Fast 8-bit byte cosine of angle 0..255, result is in range -127..127
|
||||
|
||||
cos16u(x)
|
||||
Fast 16-bit uword cosine of angle 0..255, result is in range 0..65535
|
||||
|
||||
cos16(x)
|
||||
Fast 16-bit word cosine of angle 0..255, result is in range -32767..32767
|
||||
|
||||
cosr8u(x)
|
||||
Fast 8-bit ubyte cosine of angle 0..179 (each is a 2 degree step), result is in range 0..255
|
||||
Angles 180..255 will yield a garbage result!
|
||||
|
||||
cosr8(x)
|
||||
Fast 8-bit byte cosine of angle 0..179 (each is a 2 degree step), result is in range -127..127
|
||||
Angles 180..255 will yield a garbage result!
|
||||
|
||||
cosr16u(x)
|
||||
Fast 16-bit uword cosine of angle 0..179 (each is a 2 degree step), result is in range 0..65535
|
||||
Angles 180..255 will yield a garbage result!
|
||||
|
||||
cosr16(x)
|
||||
Fast 16-bit word cosine of angle 0..179 (each is a 2 degree step), result is in range -32767..32767
|
||||
Angles 180..255 will yield a garbage result!
|
||||
Cosine. (floating point)
|
||||
If you want a fast integer cosine, have a look at examples/cx16/sincos.p8
|
||||
that contains various lookup tables generated by the 64tass assembler.
|
||||
|
||||
deg(x)
|
||||
Radians to degrees.
|
||||
@@ -794,39 +768,13 @@ round(x)
|
||||
Rounds the floating point to the closest integer.
|
||||
|
||||
sin(x)
|
||||
Sine. (floating point version)
|
||||
Sine. (floating point)
|
||||
If you want a fast integer sine, have a look at examples/cx16/sincos.p8
|
||||
that contains various lookup tables generated by the 64tass assembler.
|
||||
|
||||
sgn(x)
|
||||
Get the sign of the value. Result is -1, 0 or 1 (negative, zero, positive).
|
||||
|
||||
sin8u(x)
|
||||
Fast 8-bit ubyte sine of angle 0..255, result is in range 0..255
|
||||
|
||||
sin8(x)
|
||||
Fast 8-bit byte sine of angle 0..255, result is in range -127..127
|
||||
|
||||
sin16u(x)
|
||||
Fast 16-bit uword sine of angle 0..255, result is in range 0..65535
|
||||
|
||||
sin16(x)
|
||||
Fast 16-bit word sine of angle 0..255, result is in range -32767..32767
|
||||
|
||||
sinr8u(x)
|
||||
Fast 8-bit ubyte sine of angle 0..179 (each is a 2 degree step), result is in range 0..255
|
||||
Angles 180..255 will yield a garbage result!
|
||||
|
||||
sinr8(x)
|
||||
Fast 8-bit byte sine of angle 0..179 (each is a 2 degree step), result is in range -127..127
|
||||
Angles 180..255 will yield a garbage result!
|
||||
|
||||
sinr16u(x)
|
||||
Fast 16-bit uword sine of angle 0..179 (each is a 2 degree step), result is in range 0..65535
|
||||
Angles 180..255 will yield a garbage result!
|
||||
|
||||
sinr16(x)
|
||||
Fast 16-bit word sine of angle 0..179 (each is a 2 degree step), result is in range -32767..32767
|
||||
Angles 180..255 will yield a garbage result!
|
||||
|
||||
sqrt16(w)
|
||||
16 bit unsigned integer Square root. Result is unsigned byte.
|
||||
To do the reverse, squaring an integer, just write ``x*x``.
|
||||
|
Reference in New Issue
Block a user