Showing posts with label math. Show all posts
Showing posts with label math. Show all posts

Wednesday, November 9, 2011

Sine function using inline assembly

static inline float sin(float angle)
{
  float answer;
  asm ("fsin" : "=t" (answer) : "0" (angle));
  return answer;
}