Java Distance Calculate calculateDistancePointToShowerAxis(double cogx, double cogy, double delta, double x, double y)

Here you can find the source of calculateDistancePointToShowerAxis(double cogx, double cogy, double delta, double x, double y)

Description

calculate Distance Point To Shower Axis

License

Open Source License

Declaration

public static double calculateDistancePointToShowerAxis(double cogx, double cogy, double delta, double x,
            double y) 

Method Source Code

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

public class Main {
    public static double calculateDistancePointToShowerAxis(double cogx, double cogy, double delta, double x,
            double y) {
        double distance = 0;

        double r0 = (x - cogx) * Math.cos(delta) + (y - cogy) * Math.sin(delta);

        distance = Math/*from w w  w.j  a  v a  2  s.c  om*/
                .sqrt(Math.pow(cogx - x + r0 * Math.cos(delta), 2) + Math.pow(cogy - y + r0 * Math.sin(delta), 2));

        return distance;
    }
}

Related

  1. calculateDistance(int x1, int y1, int z1, int x2, int y2, int z2)
  2. calculateDistance(String firstString, String secondString)
  3. calculateDistanceBetween(double sourceLatitude, double sourceLongitude, double destinationLatitude, double destinationLongitude)
  4. calculateDistanceInKm(double lat1, double lon1, double lat2, double lon2)
  5. calculateDistanceNoNormalization(float[] vec1, float[] vec2)
  6. calculateDistanceWithWGS84(double lat1, double lng1, double lat2, double lng2)
  7. computeDistance(double lat1, double lon1, double lat2, double lon2)
  8. computeDistance(Double startLat, Double startLon, Double endLat, Double endLon)
  9. computeDistance(final int[] position1, final int[] position2)