Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

How do I wrote floor() without boolean logic?

Name: Anonymous 2006-02-19 14:55

How do I write a floor function without using boolean logic?

Name: Anonymous 2006-03-01 1:06

int floor(double a)
{
  double x = abs(a);
  x = int(x);
  a = a + 2x;
  int(a);
  a = a - 2x;
  return a;
}
 

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List