I'm in need of help...

How would I convert a number (i.e. 1000) to whatever angle that would be?

13 posts
• Page **1** of **2** • **1**, 2

**Posts:**3,231**Reputation:**16,293

Spriter Dev

B

85
S

20
G

12
Yep, you probably don't need the number of complete rotations that 1000/ 360 would give you. (2)

% or modulus gives you the remainder of 1000/360.(.77777777)

But keep in mind that's in addition to current angle.

If you do need the number of rotations, and a method to implement them without the 0/360 reset, Lucid's math plug with anglerp() will also work nice.

% or modulus gives you the remainder of 1000/360.(.77777777)

But keep in mind that's in addition to current angle.

If you do need the number of rotations, and a method to implement them without the 0/360 reset, Lucid's math plug with anglerp() will also work nice.

**Posts:**7,239**Reputation:**61,506

B

160
S

48
G

80
That sort of works...

If I set an object's angle to 1000, I need to know what angle (0-360) that would be.

So if the number happens to be 450.33 then the object would be pointing at 90.33 degrees.

This way gives me an approximate but only in whole numbers.

If I set an object's angle to 1000, I need to know what angle (0-360) that would be.

So if the number happens to be 450.33 then the object would be pointing at 90.33 degrees.

This way gives me an approximate but only in whole numbers.

Follow me on Twitter @evgLabs

**Posts:**251**Reputation:**4,049

B

33
S

14
G

4
[quote="YetAnotherSuperhero":1xcyeuxj]That sort of works...

If I set an object's angle to 1000, I need to know what angle (0-360) that would be.

So if the number happens to be 450.33 then the object would be pointing at 90.33 degrees.

This way gives me an approximate but only in whole numbers.[/quote:1xcyeuxj]

Not sure what you mean.

360 degrees is one revolution, so 0.25 of one revolution would be?

If I set an object's angle to 1000, I need to know what angle (0-360) that would be.

So if the number happens to be 450.33 then the object would be pointing at 90.33 degrees.

This way gives me an approximate but only in whole numbers.[/quote:1xcyeuxj]

Not sure what you mean.

360 degrees is one revolution, so 0.25 of one revolution would be?

**Posts:**7,239**Reputation:**61,506

B

160
S

48
G

80
But that only works on integers not floats.

How could I do this but with floats?

Also... with negative numbers if you did -450%360 it gives you -90 but if you set a sprite to -450%360 and retrieve the angle it is at you get 270 which is what I want

How could I do this but with floats?

Also... with negative numbers if you did -450%360 it gives you -90 but if you set a sprite to -450%360 and retrieve the angle it is at you get 270 which is what I want

Follow me on Twitter @evgLabs

**Posts:**251**Reputation:**4,049

B

33
S

14
G

4
13 posts
• Page **1** of **2** • **1**, 2

Return to Help & Support using Construct Classic

## Who is online |

Users browsing this forum: No registered users and 1 guest |