diff --git a/docs/source/libraries.rst b/docs/source/libraries.rst index 044ac826b..f70be39a2 100644 --- a/docs/source/libraries.rst +++ b/docs/source/libraries.rst @@ -500,9 +500,18 @@ but perhaps the provided ones can be of service too. Sets a new seed for the pseudo-RNG sequence (both rnd and rndw). The seed consists of two words. Do not use zeros for the seed! +.. sidebar:: + + This is a graph showing the various ranges of values mentioned in the integer sine and cosine + routines that follow below. + + Only the sine function is shown, but the cosine function follows the same pattern. + +.. image:: sinegraph.svg + ``sin8u (x)`` Fast 8-bit ubyte sine. - x = angle 0...2π scaled as 0...255. Result is unigned, scaled as 0...255 + x = angle 0...2π scaled as 0...255. Result is unsigned, scaled as 0...255 ``sin8 (x)`` Fast 8-bit byte sine. diff --git a/docs/source/sinegraph.svg b/docs/source/sinegraph.svg new file mode 100644 index 000000000..b7bb8d176 --- /dev/null +++ b/docs/source/sinegraph.svg @@ -0,0 +1,354 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + π + + + + + + + + + + + + 0 + + + + + + 128 + + + + + + 255 + + + + + + -127 + + + + + + 0 + + + + + + 127 + + + + + + 0 + + + + + + 0 + + + + + + 90 + + + + + + 179 + + + + + + 255 + + + + + + 128 + + + + + + 0 + + + + + + y = sin(x) + + + + + + y + + + + + + x + + + + + + + + \ No newline at end of file