/** * @param destination * @return the distance between the point described by this vector and the given destination point. * @throws NullPointerException * if destination is null. */ @Override public double distance(final ReadOnlyVector4 destination) { return MathUtils.sqrt(distanceSquared(destination)); }
/** * @param x * @param y * @param z * @param w * @return the distance between the point described by this vector and the given x, y, z, w point. */ @Override public double distance(final double x, final double y, final double z, final double w) { return MathUtils.sqrt(distanceSquared(x, y, z, w)); }
/** * @param x * @param y * @param z * @param w * @return the distance between the point described by this vector and the given x, y, z, w point. */ @Override public double distance(final double x, final double y, final double z, final double w) { return MathUtils.sqrt(distanceSquared(x, y, z, w)); }
/** * @param destination * @return the distance between the point described by this vector and the given destination point. * @throws NullPointerException * if destination is null. */ @Override public double distance(final ReadOnlyVector4 destination) { return MathUtils.sqrt(distanceSquared(destination)); }
/** * @param destination * @return the squared distance between the point described by this vector and the given destination point. When * comparing the relative distance between two points it is usually sufficient to compare the squared * distances, thus avoiding an expensive square root operation. * @throws NullPointerException * if destination is null. */ @Override public double distanceSquared(final ReadOnlyVector4 destination) { return distanceSquared(destination.getX(), destination.getY(), destination.getZ(), destination.getW()); }
/** * @param destination * @return the squared distance between the point described by this vector and the given destination point. When * comparing the relative distance between two points it is usually sufficient to compare the squared * distances, thus avoiding an expensive square root operation. * @throws NullPointerException * if destination is null. */ @Override public double distanceSquared(final ReadOnlyVector4 destination) { return distanceSquared(destination.getX(), destination.getY(), destination.getZ(), destination.getW()); }