# SnippetAngles: Clockwise

#### Dirac

##### 22710180
JASS:
//Determines if &quot;a&quot; gets closer to &quot;b&quot; by going clockwise.
function Clockwise takes real a, real b returns boolean
return Sin(b-a)&lt;=0
endfunction

Example:
Lets take 2 angles, lets say 90 and 330

The function [ljass]Clockwise(90,330)[/ljass] returns true, because 90 is closer to 330 by going clockwise.

Explanation:
[ljass]Sin(330-90) - > Sin(240) == -0.866[/ljass]
The result is negative, the function returns true.
"Sin" is a function that evaluates the position of an angle according to it's image in the Y axis.
So if the angle given is between 180- and 0+ it returns a positive number, but if it's between 180+ and 360- it returns a negative number.

So now Imagine comparing 0 to any other given angle. We know that 0 has to go counter-clockwise to reach 30, and Sin(30) is positive, and to reach 330 it has to go clockwise, and Sin(330) is negative.
So basically the function takes the comparison of the two given angles and turns it into comparing the angle to 0.
[ljass]Clockwise(90,330)[/ljass] is the same as [ljass]Clockwise(0,240)[/ljass]

#### Marvic June B. Corpuz

##### You can change this now in User CP.
So I have a question sir because I have problems on making my 3 dummies move in a counter clockwise direction. how to set the points on that and if the dummy reaches from 0 to 360 degrees completing the cycle.

General chit-chat
Help Users
• No one is chatting at the moment.
• tom_mai78101:
Hmm, about the Headline News, I noticed threads are being moved into the subforum (Health News, Environmental News, etc.). When that happens, the TH Forum Home page loses the articles, and instead would show old articles posted 1 or 2 weeks ago.
• tom_mai78101:
• Ghan:
I added those forums to the filter for that widget.
+1
• tom_mai78101:
Oh nice. They're back. Thanks.
• tom_mai78101:
Now I think it makes more sense for me to put news in their own subforums, without worry.
• The Helper:
Awesome Ghan thanks! I was purposely not moving the first 15 news articles in Headline news to the different subforums but I guess I don't have to do that now?
• tom_mai78101:
Question: Is there a way to remove thread redirects? It creates a copy of the moved thread and takes up space, and I am leaning towards wanting to remove them in the Headline News. But if they have an expiration date, I guess I'm fine with it.
• The Helper:
If you move a thread please leave a permanent redirect. You can delete any redirects after 6 months. The redirects are left to help Search Engines find the moved content.
• tom_mai78101:
What if you move the permanent redirect, not the thread?
• The Helper:
I think that works but I have not messed with it. You can delete redirects though if you have to that will not delete the original thread
• The Helper:
if a redirect ends up in the same forum as the post it goes to though I think the redirect drops or fails or something but they are not bugged out and when you are working on an indirect the original post is safe.
• The Helper:
Happy Early Friday
+1
• V-SNES:
Happy Friday
• tom_mai78101:
Fun Friday for me
• tom_mai78101:
Happy Fun Friday to all.
+2
• The Helper:
Happy Sunday everyone!!!
• V-SNES:
Happy Sunday!!!
+1
• jonas:
Happy monday
• jonas:
Everyone hates mondays?
+1
• The Helper:
Happy Tuesday!
• jonas:
Happy belated tuesday
• tom_mai78101:
I found out you can't delete nor hide redirect links to existing threads. It will just stay there. I have no choice now but to start moving thread redirects to News Archive.
• The Helper:
That is not the way that it works for me I can delete redirects you just have to hit refresh sometimes big deletes will take a while as long as moves\
• The Helper:
You don't have to do that you can just leave stuff there in headline news for up to a year it was already down to like 8 months there is no rush.

• Ghan