Embedded Xinu Operating System
An ongoing research project and educational operating system.
|
#include <stddef.h>
#include <framebuffer.h>
Functions | |
double | power (double base, int exp) |
long | factorial (int num) |
double | cosine_taylor (double x, int terms) |
double | cos (int x) |
double | sine_taylor (double x, int terms) |
double | sin (int x) |
Provides sine and cosine for Taylor series. Cannot handle values above 215 degrees–will cause overflow. To correct this, only compute values between 0 and 90. Answers are not exactly accurate, but accurate enough for our purposes.
double sin | ( | int | x | ) |
Compute the sine using the Taylor approximation as a helper function Note: For graphics purposes, the sine must always be turned negative because a monitor is technically in quadrant 4 instead of quadrant 1.
x | Angle, in degrees |