Java Angle Between angleBetween2Lines(double l1x1, double l1y1, double l1x2, double l1y2, double l2x1, double l2y1, double l2x2, double l2y2)

Here you can find the source of angleBetween2Lines(double l1x1, double l1y1, double l1x2, double l1y2, double l2x1, double l2y1, double l2x2, double l2y2)

Description

angle Between Lines

License

Open Source License

Declaration

public static double angleBetween2Lines(double l1x1, double l1y1, double l1x2, double l1y2, double l2x1,
            double l2y1, double l2x2, double l2y2) 

Method Source Code

//package com.java2s;

public class Main {
    public static double angleBetween2Lines(double l1x1, double l1y1, double l1x2, double l1y2, double l2x1,
            double l2y1, double l2x2, double l2y2) {
        double angle1 = Math.atan2(l1y1 - l1y2, l1x1 - l1x2);
        double angle2 = Math.atan2(l2y1 - l2y2, l2x1 - l2x2);
        return angle1 - angle2;
    }/*w  ww .ja  va2 s  . co  m*/
}

Related

  1. angle2DBetween(double[] coord1, double[] coord2)
  2. angle_between(double x1, double y1, double z1, double x2, double y2, double z2)
  3. angleBetween(double[] v1, double[] v2)
  4. angleBetween(final double ax, final double ay, final double bx, final double by)
  5. angleBetween2LinesVectorAlgebra(double x11, double y11, double x12, double y12, double x21, double y21, double x22, double y22)
  6. AngleBetweenDegrees(double longitudeFirstBody, double latitudeFirstBody, double longitudeSecondBody, double latitudeSecondBody)
  7. angleBetweenPoints(double ax, double ay, double bx, double by)
  8. AngleBetweenVectors(double X1, double Y1, double Z1, double X2, double Y2, double Z2)