Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: Nick Porcino Newsgroups: scea.yaroze.programming.3d_graphics Subject: Re: A reply to one of Nick's questions. Date: Mon, 22 Dec 1997 23:43:21 -0800 Organization: SCEA News Server Lines: 14 Message-ID: <349F6B96.2193@bc.sympatico.ca> References: <01bcbc4f$8c5a55e0$0e9f22cf@SmarttNet.smartt.com> <3414FD7E.2EE5@bc.sympatico.ca> <34150952.6D6A5DF3@micronetics.com> <01bcfc94$f0520e00$6abf43ce@wkwerner> <01bcffa1$b4193660$a5bf43ce@wkwerner> NNTP-Posting-Host: vcta01m01-40.bctel.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01-C-SYMPA (Macintosh; I; PPC) The square root routine I posted does work for 32.0 and 16.16 numbers. You just have to think carefully about the result if you aren't doing 32.0 which is what the routine explicitly does. In the case of 16.16 for example, it works because you've got a convenient 256 * 256 in there that makes it work. 4.12 would probably have to be shifted to 4.16 to get another one of those convenient squares of powers of two happening. Luckily you've got some useless bits left over for such a shift if you cast the value to long. It's a bit late at night right now, and I just came out of my office after working overtime for weeks to ship a game before Christmas, so I don't actually have enough brain power stored up right now to make sense or think it through enough to figure it out, sorry for babbling... - nick