Java Geometry Algorithm dot(final Point2D a, final Point2D b)

Here you can find the source of dot(final Point2D a, final Point2D b)

Description

Calculates the dot product of two vectors.

License

Open Source License

Parameter

Parameter Description
a The first vector.
b The second vector.

Return

The dot product.

Declaration

public static final double dot(final Point2D a, final Point2D b) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.awt.geom.Point2D;

public class Main {
    /**/*from  w w w  . jav  a 2 s .c  o  m*/
     * Calculates the dot product of two vectors.
     * 
     * @param a
     *            The first vector.
     * @param b
     *            The second vector.
     * @return The dot product.
     */
    public static final double dot(final Point2D a, final Point2D b) {
        return a.getX() * b.getX() + a.getY() * b.getY();
    }
}

Related

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