New Helper Userlib

Blitz3D Forums/Blitz3D Userlibs/New Helper Userlib

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Here are some routines I added mainly because they are optimized for speed plus they've helped me in the past in making enemy AI...
Graphics 640,480,0,2

Print Distance (0,0,10,10)
Print OriginAngle(10,10)
Print Rad2Deg (OriginAngle(10,10))
Print Deg2Rad(315)



OriginAngle...
' This function will return the angle from origin 0,0 to X,Y
' Useful to figure out in which direction a set of coordinates
' is from another. By taking 2 sets of coordinates and normalizing them
' (ie: subtract X2-X1, Y2-Y1) will let you find the angle of any coordinate (X1,Y1)
' to any other coordinate. (X2,Y2)