Here you can find the source of distance(@Nonnull Point2D pA, @Nonnull Point2D pB)
Parameter | Description |
---|---|
pA | the first point |
pB | the second point |
@CheckReturnValue public static double distance(@Nonnull Point2D pA, @Nonnull Point2D pB)
//package com.java2s; //License from project: Open Source License import java.awt.geom.Point2D; import javax.annotation.CheckReturnValue; import javax.annotation.Nonnull; public class Main { /**/*from ww w . j a v a2 s .c o m*/ * calculate the distance between two points * * @param pA the first point * @param pB the second point * @return the distance between the two points */ @CheckReturnValue public static double distance(@Nonnull Point2D pA, @Nonnull Point2D pB) { return pA.distance(pB); } }