Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 51879

Mathematics questions deal with the arithmetic, geometry, calculus, formulae and other calculations used in the development of a game.

0 votes

Comparing angles and working out the difference

Since you only care about eliminating branches and "complex" operations beyond arithmetic, I would recommend this: min(abs(angle1 - angle2), abs(angle2 - angle1)) You still need an abs in there desp …
DrZ214's user avatar
  • 348
1 vote
0 answers
126 views

How to get a difference of angles in one mathematical expression? [duplicate]

I need to do this for AI and also range calculation over a curved surface. I have two angles, a1 and a2, which can be in the range from 0 to 359. I need to calculate the difference between them, and …
DrZ214's user avatar
  • 348