Path: chuka.playstation.co.uk!scea!peter_alau@playstation.sony.com From: shade@dragonshadow.com (Scott Cartier) Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: What do'you mean I have to brush up on me maths! Date: Wed, 14 Jul 1999 20:56:30 GMT Organization: SCEA News Server Lines: 18 Message-ID: <378cf827.15426576@news.scea.sony.com> References: <7ko1jf$33u25@chuka.playstation.co.uk> <376fbd21.251404588@news.scea.sony.com> <7lkucs$ko217@chuka.playstation.co.uk> <7lnteg$i9a1@chuka.playstation.co.uk> <37823145.682258342@news.scea.sony.com> <7mah71$t1v6@chuka.playstation.co.uk> <378a1a59.1200158692@news.scea.sony.com> <7mioup$t1v11@chuka.playstation.co.uk> NNTP-Posting-Host: vmlabs64.vmlabs.com X-Newsreader: Forte Free Agent 1.11/32.235 >Surely there's a maximum amount that can be entered, as the input is >calculated from the position of a player, which is probably on the screen. >You could probably work out the maximum input for the inverse tan, by taking >the largest point on the screen, and using it in the calculation for the >input. However, you'd have to be certain that the maximum screen >width/height will be the maximum of values used in the input. As "dx" approaches zero (which means the velocity vector approaches straight up or down - not at all unreasonable) the division result of (dy / dx) blows up. Plus, if dx is EQUAL to zero then you have that dreaded divided-by-zero error. You could special case that away though. Yeah, I guess if you're not going for high precision you could make a look-up table. But without high precision you're more at risk for rounding errors which could make things look bad. Scott