Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var winHeight=$(window).height();
- var winWidth=$(window).width();
- var Layout = function(){
- this.half=480;
- this.targetX=960;
- this.targetY=527;
- this.resultX=0;
- this.resultY=0;
- this.compute= function(xx,yy){
- var reX = xx-this.targetX;
- var reY = yy-this.targetY;
- var teX = reX+this.targetX;
- var teY = reY+this.targetY;
- this.resultX=teX/this.targetX;
- this.resultY=teY/this.targetY
- };
- };
- var layout = new Layout();
- layout.compute(winWidth,winHeight);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement