org.openmali.distance
Class Distance2D

java.lang.Object
  extended by org.openmali.distance.Distance2D

public abstract class Distance2D
extends java.lang.Object

Class used to compute distance between two points in a plane


Constructor Summary
Distance2D()
           
 
Method Summary
static float dist(float t1x, float t1y, float t2x, float t2y)
           
static float dist(Tuple2f t1, Tuple2f t2)
           
static float dist(Tuple3f p1, Tuple3f p2)
           
static float squaredDist(Tuple2f t1, Tuple2f t2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Distance2D

public Distance2D()
Method Detail

dist

public static float dist(float t1x,
                         float t1y,
                         float t2x,
                         float t2y)
Returns:
The distance between the two points

dist

public static float dist(Tuple2f t1,
                         Tuple2f t2)
Returns:
The distance between the two points

dist

public static float dist(Tuple3f p1,
                         Tuple3f p2)
Returns:
The distance between the two points

squaredDist

public static float squaredDist(Tuple2f t1,
                                Tuple2f t2)
Returns:
The squared distance between the two points