Added a version of distance() that takes Point objects.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1375 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-05-17 21:13:03 +00:00
parent db31cedbd8
commit a8caf98434
@@ -1,5 +1,5 @@
//
// $Id: MathUtil.java,v 1.3 2001/08/14 22:54:45 mdb Exp $
// $Id: MathUtil.java,v 1.4 2002/05/17 21:13:03 mdb Exp $
package com.threerings.media.util;
@@ -22,6 +22,14 @@ public class MathUtil
((y1 - y0) * (y1 - y0)));
}
/**
* Return the distance between the given points.
*/
public static float distance (Point source, Point dest)
{
return MathUtil.distance(source.x, source.y, dest.x, dest.y);
}
/**
* Return a string representation of the given line.
*/