Example usage for org.apache.commons.math.geometry Vector3D distance

List of usage examples for org.apache.commons.math.geometry Vector3D distance

Introduction

In this page you can find the example usage for org.apache.commons.math.geometry Vector3D distance.

Prototype

public static double distance(Vector3D v1, Vector3D v2) 

Source Link

Document

Compute the distance between two vectors according to the L2 norm.

Usage

From source file:com.l2jserver.util.geometry.Coordinate.java

/**
 * Calculates the distance between <tt>this</tt> coordinate and
 * <tt>other</tt>//from w  w w . jav  a  2 s .co  m
 * 
 * @param other
 *            the other coordinate
 * @return the calculated distance
 */
public double getDistance(Coordinate other) {
    return Vector3D.distance(vector, other.vector);
}

From source file:uk.ac.imperial.presage2.util.location.Location.java

/**
 * Get the distance between this Location and the location l
 * /*from w  w  w  .  j  ava 2  s  .com*/
 * @param l
 * @return
 */
public double distanceTo(Location l) {
    return Vector3D.distance(this, l);
}