Changeset 45 for libcaca/trunk/src/math.c
- Timestamp:
- Dec 23, 2002, 12:01:35 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/src/math.c
r43 r45 4 4 * All Rights Reserved 5 5 * 6 * $Id: math.c,v 1. 1 2002/12/22 22:36:42sam Exp $6 * $Id: math.c,v 1.2 2002/12/22 23:01:35 sam Exp $ 7 7 * 8 8 * This program is free software; you can redistribute it and/or modify … … 27 27 int x = a > 100000 ? 1000 : a > 1000 ? 100 : a > 10 ? 10 : 1; 28 28 29 /* Newton's method. Three iterations are more than enough. */ 29 if( a <= 0 ) 30 { 31 return 0; 32 } 33 34 /* Newton's method. Three iterations would be more than enough. */ 30 35 x = (x * x + a) / x / 2; 31 36 x = (x * x + a) / x / 2;
Note: See TracChangeset
for help on using the changeset viewer.