UNPKG

@googleforcreators/units

Version:

A collection of utility functions as well as a React context provider for dealing with "data" and "editor" pixels in the Web Stories editor.

3 lines (2 loc) 252 B
"use strict";var t=require("./dimensions.js");module.exports=function(s,a,e,i,n){const r=e-s,o=i-a,u=Math.sqrt(r*r+o*o);return n+=Math.atan2(o,r),{x:t.dataPixels(s+u*Math.cos(n)),y:t.dataPixels(a+u*Math.sin(n))}}; //# sourceMappingURL=getCorner.js.map