Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript find smallest difference between angles

var x = Math.PI * 1.9;
var y = Math.PI * 0.1;
Math.atan2(Math.sin(x-y), Math.cos(x-y)); // -Math.PI * 0.2
 
PREVIOUS NEXT
Tagged: #javascript #find #smallest #difference #angles
ADD COMMENT
Topic
Name
8+1 =