| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Need sqrt() algorithm |
I need to do a distance calculation between two points (x0,z0) and (x1,z1). The way I know to do this is to use the distance formula, but it requires a square root calculation. I don't want to use the standard C sqrt() function because I am not using floating point for anything else. I need an algorithm for calculating square roots to 3 or 4 decimal places. It must be fast, I don't care about complexity as long as you can explain it to me well enough for me to implement, and it only needs to calculate square roots in the range 0 to 2M. If you need incentive, this is going into an OS/2 shoot'em-up 3D video game. Rob. --- Maximus/2 2.01wb* Origin: The Idle Task... (604)275-0835 Richmond BC. (1:153/905) SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413 SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1 @PATH: 153/905 828 7041 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.