Java Geometry Algorithm dot(Point a, Point b, Point c)

Here you can find the source of dot(Point a, Point b, Point c)

Description

Help function:

This function calculates the dot product of vector ab and bc.

License

Open Source License

Parameter

Parameter Description
a - one of the given point
b - one of the given point
c - one of the given point

Return

the dot product of ab and bc

Declaration

static int dot(Point a, Point b, Point c) 

Method Source Code

//package com.java2s;
import java.awt.Point;

public class Main {
    /**//from  w  w w  .j a v  a  2s . c  om
     * <p>
     * <strong>Help function:</strong>
     * </p><p>
     * This function calculates the dot product of vector ab and bc.
     * </p>
     *
     * @return the dot product of ab and bc
     *
     * @param a - one of the given point
     * @param b - one of the given point
     * @param c - one of the given point
     */
    static int dot(Point a, Point b, Point c) {
        return (b.x - a.x) * (c.x - b.x) + (b.y - a.y) * (c.y - b.y);
    }
}

Related

  1. deriveLocation(Point origin, double radius)
  2. determineConnectionPoint(Point wayPoint, Polygon polygon)
  3. directVincenty(Point2D.Double point, double brng, double distance)
  4. dot(@Nonnull Point2D pA, @Nonnull Point2D pB)
  5. dot(final Point2D a, final Point2D b)
  6. dotNorm(final Point2D a, final Point2D b)
  7. drag(Robot robot, Point startPoint, Point endPoint, int button)
  8. dx(Point a, Point b)
  9. edge(Collection points)