Consider the following two pieces of code:
var adj=0>grip.y?0<grip.x?0:-180:0<grip.x?-360:-180;
and
var adj;
if (grip.y < 0) {
if (grip.x > 0)
adj = 0;
else
adj = -180;
}
else {
if (grip.x > 0)
adj = -360;
else
adj = -180;
}
They both produce the same result, but which is faster?