| java.lang.Object | |
| ↳ | com.mapsted.positioning.MathCalc | 
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| MathCalc() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static int | argMax(ArrayList<Double> arrayList) | ||||||||||
| static int | argMin(ArrayList<Double> arrayList) | ||||||||||
| static double | 
        average(List<Double> array)
        
         Calcalate the average of a list of numbers. 
  
   | ||||||||||
| static float | averageF(List<Float> array) | ||||||||||
| static Mercator | centroid(MercatorVector boundary) | ||||||||||
| static double | distFromPointToLineSegment(Mercator pt0, Mercator l1, Mercator l2) | ||||||||||
| static double | 
        distance(IMercator A, IMercator B)
        
         Calculate the distance between two points. 
  
   | ||||||||||
| static Double | 
        distanceToCurrentUserPosition(IMercator point, CoreApi coreApi)
        
         Calculate the distance between the current user's position to the point. 
  
   | ||||||||||
| static float | 
        distanceWithFloorPenalty(CoreApi coreApi, IMercatorZone locA, IMercatorZone locB)
        
         Returns approximate distance between two locations, roughly taking into account floor changes  
  
   | ||||||||||
| static Float | distanceWithFloorPenaltyFromUser(CoreApi coreApi, IMercatorZone loc) | ||||||||||
| static MinMax | 
        getMinMax(ArrayList<Double> arrayList)
        
         Gets the minimum and maximum value from an array list. 
  
   | ||||||||||
| static List<Mercator> | 
        lineIntersectCircle(LineEqn lineEqn, IMercator circlePt, float r)
        
         Finds the point(s) of intersection between a circle and a line 
  
   | ||||||||||
| static List<Mercator> | 
        lineIntersectCircle(IMercator pt1, IMercator pt2, IMercator circlePt, float r)
        
         Finds the point(s) of intersection between a circle and a line 
  
   | ||||||||||
| static Mercator | 
        lineIntersectCircleFarthestFromPt1(IMercator pt1, IMercator pt2, IMercator circlePt, float r)
        
         Finds the point of intersection between a circle and a line. 
  
   | ||||||||||
| static Mercator | lineIntersection(LineEqn line1, LineEqn line2) | ||||||||||
| static LineEqn | linearFit(IMercator p0, IMercator p1) | ||||||||||
| static double[] | matrixTimesVector(double[][] M, double[] X) | ||||||||||
| static float[] | matrixTimesVector(float[][] M, float[] X) | ||||||||||
| static double | 
        max(ArrayList<Double> arrayList)
        
         Finds the maximum value from a list. 
  
   | ||||||||||
| static double | 
        min(ArrayList<Double> arrayList)
        
         Finds the minimum value from an array of numbers. 
  
   | ||||||||||
| static IdxVal | minIdxVal(ArrayList<Double> arrayList) | ||||||||||
| static double | mod(double x, double y) | ||||||||||
| static Mercator | projPointOntoLine(Mercator pt0, LineEqn lineEqn) | ||||||||||
| static double | 
        rotationAngle(Mercator loc1, Mercator loc2)
        
         Returns angle between two locations in radians clockwise from North 
  
   | ||||||||||
| static List<Double> | solveQuadraticEquation(double a, double b, double c) | ||||||||||
| static double | 
        sum(List<Double> array)
        
         Calculate the sum of a list of numbers. 
  
   | ||||||||||
| 
  [Expand]
   Inherited Methods  | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
   
From class
  java.lang.Object
 | |||||||||||
Calcalate the average of a list of numbers.
| array | a list of numbers. | 
|---|
Calculate the distance between two points.
| A | one point in the map. | 
|---|---|
| B | another point in the map. | 
Calculate the distance between the current user's position to the point. It will return null if the current position is not yet set
| point | a point in the map. | 
|---|
Returns approximate distance between two locations, roughly taking into account floor changes
Gets the minimum and maximum value from an array list.
| arrayList | The list where to do the search. | 
|---|
Finds the point(s) of intersection between a circle and a line
| lineEqn | equation of the line | 
|---|---|
| circlePt | circle center point | 
| r | circle radius | 
Finds the point(s) of intersection between a circle and a line
| pt1 | line point 1 | 
|---|---|
| pt2 | line point 2 | 
| circlePt | circle center point | 
| r | circle radius | 
Finds the point of intersection between a circle and a line. Only returns one point, uses pt1 to disambiguate, if necessary
| pt1 | line point 1 (will return point farthest from this one) | 
|---|---|
| pt2 | line point 2 | 
| circlePt | circle center point | 
| r | circle radius | 
Finds the maximum value from a list.
| arrayList | The list where to do the search. | 
|---|
Finds the minimum value from an array of numbers.
| arrayList | The list where to do the search. | 
|---|
Returns angle between two locations in radians clockwise from North
| loc1 | one point in the map | 
|---|---|
| loc2 | another point in the map | 
Calculate the sum of a list of numbers.
| array | a list of numbers. | 
|---|