Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added Mirage.Tools

  • Loading branch information...
commit 35f335740cb54a680b7eaf69eabd6fe4c6953dcc 1 parent 423eda5
@chrome authored
Showing with 6 additions and 0 deletions.
  1. +1 −0  Cakefile
  2. +5 −0 src/core/tools.coffee
View
1  Cakefile
@@ -9,6 +9,7 @@ unitedFiles = ->
files = [
'core/mirage'
'core/object'
+ 'core/tools'
'entities/resources/resource'
'entities/resources/image'
'entities/resources/animation'
View
5 src/core/tools.coffee
@@ -0,0 +1,5 @@
+class Mirage.Tools
+ @distantion: (sX, sY, dX, dY) ->
+ dX = Math.abs(sX - dX)
+ dY = Math.abs(sY - dY)
+ Math.round(Math.sqrt(dX * dX + dY * dY))
Please sign in to comment.
Something went wrong with that request. Please try again.