Java examples for javafx.geometry:Point2D
distance between two JavaFX Point2D
//package com.java2s; import javafx.geometry.Point2D; public class Main { public static double distance(Point2D a, Point2D b) { return Math.sqrt((a.getX() - b.getX()) * (a.getX() - b.getX()) + (a.getY() - b.getY()) * (a.getY() - b.getY())); }/*from w ww. j a v a 2 s . co m*/ }