Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / NewXValue, etc, and their SIN Rule relationships

Author
Message
Someone
20
Years of Service
User Offline
Joined: 22nd Feb 2004
Location: Australia
Posted: 7th Mar 2004 06:37
Could someone explain to me please just how the NewXValue() functions use the Sin and Cosine rules to work? Because these functions are kind of confusing me.

Thanks.

Call me Dean.
PC1: 2.0 Ghz AMD Athlon XP - 512 Meg DDR RAM - GeForce FX 5200, PC2: 0.5 Ghz P3 - 256 Meg SD RAM - GeForce2 MX 400, PC3: 2.5 Ghz P4 - 256 Meg DDR RAM - Integrated Video Card
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th Mar 2004 12:40
x = current location
angle = angle of rotation
dist = distance to move

function newXValue(x, angle, dist)
x = x + cos(angle)*dist
endfunction x

function newZValue(z, angle, dist)
z = z + sin(angle)*dist
endfunction z

"eureka" - Archimedes

Login to post a reply

Server time is: 2024-09-22 00:32:09
Your offset time is: 2024-09-22 00:32:09