Java Geometry Algorithm clacGradient(Point2D p1, Point2D p2, Point2D p3)

Here you can find the source of clacGradient(Point2D p1, Point2D p2, Point2D p3)

Description

clac Gradient

License

Open Source License

Declaration

private static double clacGradient(Point2D p1, Point2D p2, Point2D p3) 

Method Source Code

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

import java.awt.geom.Point2D;

public class Main {
    private static double clacGradient(Point2D p1, Point2D p2, Point2D p3) {
        double p1x = p1.getX();
        double p1y = p1.getY();
        double p2x = p2.getX();
        double p2y = p2.getY();
        double p3x = p3.getX();
        double p3y = p3.getY();
        return p1x * (p2y - p3y) + p2x * (p3y - p1y) + p3x * (p1y - p2y);
    }/*  www  .j  a  v a  2  s  .  c o  m*/
}

Related

  1. centroid(Vector points)
  2. checkPoint(Point p)
  3. checkPoint(Point point, String name)
  4. checkWinPossibility(int[][] board, Point p1, Point p2, int playerID)
  5. circleLineIntersection(double theta, double r, double h, double k, Point2D[] result)
  6. cleanList(List blueList, Polygon borders)
  7. colinearPoint(Line2D line, Point2D point, double distance)
  8. computeAngleDEG(@Nonnull Point2D p1, @Nonnull Point2D p2)
  9. computeAngleRAD(@Nonnull Point2D p)