|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#4
|
|||
|
|||
|
try this bit of code, it should give you a quick way to find square roots... but only for ints. It is accurate up to a certian point it should have enough accuracy for anything that needs to be done with our robots. If you need anything else let me know.
inline int sroot(int n) { int c = 0; int a = 1; do {n -= a; a += 2; ++c;} while (n > 0); return c; } |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mulit-postioning with pnuematics this year? | KenWittlief | Pneumatics | 101 | 01-02-2005 21:54 |
| Aspartame | shyra1353 | Chit-Chat | 8 | 20-01-2004 22:41 |
| Square Rack Sketch | archiver | 2000 | 1 | 24-06-2002 00:09 |
| Notes on building the Square Rack | archiver | 2000 | 1 | 24-06-2002 00:06 |
| Cheaters in the bunch | Hey | Rumor Mill | 23 | 14-04-2002 11:57 |