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

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

Introduction

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

Prototype

public static double distanceSq(Vector3D v1, Vector3D v2) 

Source Link

Document

Compute the square of the distance between two vectors.

Usage

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

/**
 * Calculates the squared distance between <tt>this</tt> coordinate and
 * <tt>other</tt>. This method is slighter faster then
 * {@link #getDistance(Coordinate)}.//from ww  w .  j  av a2 s.c o m
 * 
 * @param other
 *            the other coordinate
 * @return the calculated distance
 */
public double getDistanceSquared(Coordinate other) {
    return Vector3D.distanceSq(vector, other.vector);
}