Changed instances of variables named radians to rads b/c this causes an issue when translating to Javascript