Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sourceWidth = width/2;
- sourceHeight = height/2;
- diagonal = Math.sqrt(sourceWidth * sourceWidth + sourceHeight * sourceHeight);
- sinB = sourceWidth/diagonal;
- sourceRotation = Math.abs(rotation.value);
- a0 = radiansToDegrees(Math.asin(sinB));
- a1 = a0 - sourceRotation;
- x = sourceWidth - sourceHeight * Math.tan(degreesToRadians(a1));
- ratio = width/(width + x*2);
- value / (ratio)
Add Comment
Please, Sign In to add comment