ok. I'll work on that :) *** long pause ***
EDIT: ok, I'm back
this seems to work. (I put Chris C's Mod Angle where he probably meant for it to go all along :) )
I did a few tests: here is one.
i revved the amount up to 1006.29 with the angle at 0.0
using my trusty Google calculator I find that
http://www.google.com/search?q=1006+mod+360
=286
I press the right arrow once and my new angle = 286.29
(not sure how efficient/useful this is but it was fun)
EDIT: ok, I'm back
this seems to work. (I put Chris C's Mod Angle where he probably meant for it to go all along :) )
I did a few tests: here is one.
i revved the amount up to 1006.29 with the angle at 0.0
using my trusty Google calculator I find that
http://www.google.com/search?q=1006+mod+360
=286
I press the right arrow once and my new angle = 286.29
(not sure how efficient/useful this is but it was fun)
Import sidesign.MiniB3D Graphics3D 800,600 cube:Tentity =CreateCube() ; cam:Tentity=CreateCamera() ; MoveEntity cam,0,0,-5 EntityColor cube,200,0,0 light = CreateLight() ; MoveEntity light,-5,5,-5 Local amount:Float = 3.1 Repeat ' Mod method angle1#=angle1# Mod 360 ' Wrap 360 Function method angle2# = wrap360(angle2#) RotateEntity cube,0,angle2#,0 RenderWorld text 0,40,"Step Amount: "+amount text 0,60,"angle = angle Mod 360: "+angle1 text 0,80,"Wrap360(angle): "+angle2 text 0,120," press left/right keys to inc/dec angle" text 0,140," press up/down keys to inc/dec step amount" Flip If Keyhit(KEY_LEFT) angle1:-amount angle2:-amount EndIf If Keyhit(KEY_RIGHT) angle1:+amount angle2:+amount EndIf If KeyDown(KEY_UP) amount:+3.3 EndIf If KeyDown(KEY_DOWN) amount:-3.3 EndIf Until KeyDown(KEY_ESCAPE) Function Wrap360:Float(angle#) angle:Mod 360 If angle > 359.999 Then angle = angle - 360 If angle < 0 Then angle = 360 + angle Return angle End Function