Search code examples
javamathcoordinatespointrectangles

how to find point coordinate in between four point cordinate(Rectancle)


I want to find the point in between four points or not. Please help me, is there any algorithm?? I want to write in java program.

Thanks, Nitin


Solution

  • You can use java.awt.Polygon.

    public boolean contains(Point p)
    

    Checks whether or not this Polygon contains the specified Point. It's algorithm is pretty fast. If you need an even faster approach, read this.