|
Post by u9 on Feb 25, 2007 10:48:37 GMT -5
I'm guessing ThreePiByTwo = 3*pi/2... in which case you have calculated that constant wrong. 3pi/2 is something in the order of 4,7123889803846898576939650749193'ish Btw. here is my version of the function: ' Get angle of a point from origo Function getDirection( x, y ) If x = 0 Then If y > 0 Then getDirection = pi/2 Else getDirection = -pi/2 End If ElseIf x > 0 Then getDirection = atn( y / x ) Else getDirection = atn( y / x ) + pi End If End Function
|
|
|
Post by Guilect on Feb 25, 2007 13:11:46 GMT -5
Changing the ThreePiByTwo to 4,7123889803846898576939650749193'ish fixed the being off by 13 deg.
Thanks.
|
|
|
Post by u9 on May 9, 2007 4:05:17 GMT -5
Actually it is math.GetRndN in the manual and in Brutus. Just in the change log was it RndN. It will be changed to Math.GetRndNormal This was not done. Will it be in the next version?
|
|
|
Post by Guilect on May 9, 2007 19:25:47 GMT -5
yes. done.
|
|