tasks/init/bootplate/root/enyo/source/touch/gesture.js
function(inPositions) {
			var p = inPositions;
			// yay math!, rad -> deg
			var a = Math.asin(p.y / p.h) * (180 / Math.PI);
			// fix for range limits of asin (-90 to 90)
			// Quadrants II and III
			if (p.x < 0) {
				a = 180 - a;
			}
			// Quadrant IV
			if (p.x > 0 && p.y < 0) {
				a += 360;
			}
			return a;
		}
function(inPositions) {
			var p = inPositions;
			// yay math!, rad -> deg
			var a = Math.asin(p.y / p.h) * (180 / Math.PI);
			// fix for range limits of asin (-90 to 90)
			// Quadrants II and III
			if (p.x < 0) {
				a = 180 - a;
			}
			// Quadrant IV
			if (p.x > 0 && p.y < 0) {
				a += 360;
			}
			return a;
		}
function ( inPositions ) { var p = inPositions ; // yay math!, rad -> deg var a = Math . asin ( p . y / p . h ) * ( 180 / Math . PI ) ; // fix for range limits of asin (-90 to 90) // Quadrants II and III if ( p . x < 0 ) { a = 180 - a ; } // Quadrant IV if ( p . x > 0 && p . y < 0 ) { a += 360 ; } return a ; }
find rotation angle
find rotation angle