Advertisement
ipsBruno

(Javascript) Ponto Central de um Terreno/Área

Apr 22nd, 2012
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  *  Copyright (c) 2012 [iPs]TeaM
  3.  *  Bruno da Silva (contato@brunodasilva.com)
  4.  *  Função para pegar o centro de uma zona. Dado maxy,maxx,miny,minx;
  5.  
  6.  * www.brunodasilva.com
  7.  * www.ips-team.forumeiros.com
  8. */
  9.  
  10.  
  11. function centreZone(minX, maxX, minY, maxY) {
  12.     return { centerX:(maxX - minX) / 2 + minX, centerY: (maxY - minY) / 2 + minY};
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement