Java examples for java.lang:Math Vector
Checks for the null vector.
//package com.java2s; import java.awt.geom.Point2D; public class Main { /**/*w ww . j ava 2s .co m*/ * Checks for the null vector. * * @param from The starting point. * @param to The end point. * @return Whether the vector {@code from -> to} is the null vector. */ public static boolean isNull(final Point2D from, final Point2D to) { return from.getX() == to.getX() && from.getY() == to.getY(); } }