is there a vb 6 newsgroup somewhere?

The sin() and cos() functions expect their parameters to be

in radians. To use values in degrees, you must convert them

to radians first. VB 6 does not have a built-in function to do

this. So you have to calculate it yourself.

If I'm not mistaking, it is: radians = degrees / 180 * pi

And pi is 3.141592654

So you use Sin(angle / 180 * pi) for an angle in degrees.

Kevin

Quote:

> How do i find the VB6 newsgroup? Ive looked all over for

> it in the navigation menus on the left of the internet

> explorer window but i can't find it. Only this VB .net

> NG.

> Also, while i'm here, if anyone would happen to be able to

> answer the question i was gonna post in the VB6 NG that

> would be greatly appreciated.

> I used this code in trying to make a ship fly around in an

> arcade game, but the ship flys in what seems like random

> directions. (in this code direction is a measure of

> degrees, 0 being the ship pointing straight up, 90

> pointing right, 180 down, 270 left, and so forth)

> Ship.Left = Ship.Left + (Sin(direction) * (speed))

> Ship.Top = Ship.Top - (Cos(direction) * (speed))

> This may definitely be a problem with math as im not very

> good with Trig.

> THANX!