Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
pan degree on digit!!! #339330
08/26/10 02:50
08/26/10 02:50
Joined: Jul 2009
Posts: 85
A
Altarius Offline OP
Junior Member
Altarius  Offline OP
Junior Member
A

Joined: Jul 2009
Posts: 85
Hi,

I try to show my pan angle degree on a digit, but when i pass the 360 degree if i keep paning the counter continue to add value 360,361,362,363..ect instead of returning the value to 0.

How can i do for see my rotation degree in between 0 and 360.
exemple; im at 0, i pan left the value increase between 0 to 360 and if i pan right the value decrease between 360 to 0.

thx for ur answer...

Re: pan degree on digit!!! [Re: Altarius] #339332
08/26/10 02:57
08/26/10 02:57
Joined: Apr 2006
Posts: 624
DEEP 13
badapple Offline
User
badapple  Offline
User

Joined: Apr 2006
Posts: 624
DEEP 13
you could do something like....

if(mypanel.angle>360) mypanel.angle = 0;
if(mypanel.angle<0) mypanel.angle = 360;

Re: pan degree on digit!!! [Re: badapple] #339336
08/26/10 03:27
08/26/10 03:27
Joined: Jul 2009
Posts: 85
A
Altarius Offline OP
Junior Member
Altarius  Offline OP
Junior Member
A

Joined: Jul 2009
Posts: 85
I tried it, but the counter stock after 1 full 360 degree turn.
I mean if i turn at left by 360 and i keep rotating the counter dont restart at 0 for count another turn it keep showing 360.... crazy

Re: pan degree on digit!!! [Re: Altarius] #339338
08/26/10 04:19
08/26/10 04:19
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
mypanel.angle = cycle(mypanel.angle, 0, 360);


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: pan degree on digit!!! [Re: EvilSOB] #339372
08/26/10 11:40
08/26/10 11:40
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
or use ang() for -180° to 180°


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1