Java Distance Calculate computeDistanceSqr(double t, double b1, double b2, double b3, double b4, double b5, double b6)

Here you can find the source of computeDistanceSqr(double t, double b1, double b2, double b3, double b4, double b5, double b6)

Description

Computes the numerator of d^2 for a given value of t

License

BSD License

Declaration

private static double computeDistanceSqr(double t, double b1,
        double b2, double b3, double b4, double b5, double b6) 

Method Source Code

//package com.java2s;
/**//from   w  w  w .ja  v a2s  . co  m
 * Copyright (c) 2015, by the Authors: John E Lloyd (UBC)
 *
 * This software is freely available under a 2-clause BSD license. Please see
 * the LICENSE file in the ArtiSynth distribution directory for details.
 */

public class Main {
    /**
     * Computes the numerator of d^2 for a given value of t
     */
    private static double computeDistanceSqr(double t, double b1,
            double b2, double b3, double b4, double b5, double b6) {

        double s = 2 * t / (1 + t * t);
        double c = (1 - t * t) / (1 + t * t);
        return b1 * s * s + b2 * c * c + b3 * s * c + b4 * s + b5 * c + b6;
    }
}

Related

  1. computeDistance(long[] a, long[] b)
  2. computeDistanceAndBearingFast(double lat1, double lon1, double lat2, double lon2, float[] results)
  3. computeDistanceImpl(final String firstStringInAlgorithm, final String secondStringInAlgorithm)
  4. computeDistanceInMiles(Double lat1, Double lon1, Double lat2, Double lon2)
  5. computeDistanceMap(int[][] image)
  6. computeDistanceUsingRadians(double lat1Radians, double lng1Radians, double lat2Radians, double lng2Radians)
  7. dist(double lat1, double long1, double lat2, double long2)
  8. dist(double x1, double y1, double z1, double x2, double y2, double z2)
  9. dist(final double x0, final double y0, final double x1, final double y1)