1. Re: Trig and the ...

On Wed, 6 May 1998, BABOR, JIRI wrote:
> you can try
>
>     vvmax = maxspeed * maxspeed     -- known, can be pre-calculated
>     vv = xv*xv + yv*yv              -- speed squared
>     f = (vvmax+vv) / (vv+vv)
>
> I shall not bore you with the mathematics of it - unless, of course,
> you insist. Jiri
>

This is pretty cool, and has an absolute error of 0 to -0.5, which I deem
acceptable for game arithmetic.  Where did you learn that trick, Jiri?
Bore me, I insist :)

--
                   _____         _____        _____
    ________      /\    \       /\    \      /\    \
   /   \    \    /  \____\     /  \____\    /  \____\
  /  _  \____\  /   / ___/_   /   /____/   /   / ___/_
 /  / \  |____|/   / /\____\ /    \    \  /   / /\____\
 \  \_/ /    / \   \/ / ___/_\     \    \ \   \/ / ___/_
  \    /____/   \    / /\    \\/\   \    \ \    / /\    \
   \   \    \    \   \/  \____\  \   \    \ \   \/  \____\
    \   \    \    \      /    /   \   \____\ \      /    /
     \   \____\    \    /    /     \  /    /  \    /    /
      \  /    /     \  /    /       \/____/    \  /    /
       \/____/       \/____/xseal at harborside.com\/____/

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu