MathCalc

open class MathCalc

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun argMax(arrayList: ArrayList<Double>): Int
Link copied to clipboard
open fun argMin(arrayList: ArrayList<Double>): Int
Link copied to clipboard
open fun average(array: List<Double>): Double
Calcalate the average of a list of numbers.
Link copied to clipboard
open fun averageF(array: List<Float>): Float
Link copied to clipboard
open fun centroid(boundary: List<Mercator>): Mercator
Link copied to clipboard
open fun distance(A: Mercator, B: Mercator): Double
Calculate the distance between two points.
Link copied to clipboard
open fun distanceToCurrentUserPosition(point: Mercator, coreApi: CoreApi): Double
Calculate the distance between the current user's position to the point.
Link copied to clipboard
open fun distanceWithFloorPenalty(coreApi: CoreApi, locA: MercatorZone, locB: MercatorZone): Float
Returns approximate distance between two locations, roughly taking into account floor changes
Link copied to clipboard
open fun distanceWithFloorPenaltyFromUser(coreApi: CoreApi, loc: MercatorZone): Float
Link copied to clipboard
open fun distFromPointToLineSegment(pt0: Mercator, l1: Mercator, l2: Mercator): Double
Link copied to clipboard
open fun getMinMax(arrayList: ArrayList<Double>): MinMax
Gets the minimum and maximum value from an array list.
Link copied to clipboard
open fun isValidUserPosition(p: Position): Boolean
True when p represents a real positioning fix, not the engine's uninitialized sentinel.
Link copied to clipboard
open fun linearFit(p0: Mercator, p1: Mercator): LineEqn
Link copied to clipboard
open fun lineIntersectCircle(lineEqn: LineEqn, circlePt: Mercator, r: Float): List<Mercator>
open fun lineIntersectCircle(pt1: Mercator, pt2: Mercator, circlePt: Mercator, r: Float): List<Mercator>
Finds the point(s) of intersection between a circle and a line
Link copied to clipboard
open fun lineIntersectCircleFarthestFromPt1(pt1: Mercator, pt2: Mercator, circlePt: Mercator, r: Float): Mercator
Finds the point of intersection between a circle and a line.
Link copied to clipboard
open fun lineIntersection(line1: LineEqn, line2: LineEqn): Mercator
Link copied to clipboard
Link copied to clipboard
open fun max(arrayList: ArrayList<Double>): Double
Finds the maximum value from a list.
Link copied to clipboard
open fun min(arrayList: ArrayList<Double>): Double
Finds the minimum value from an array of numbers.
Link copied to clipboard
open fun minIdxVal(arrayList: ArrayList<Double>): IdxVal
Link copied to clipboard
open fun mod(x: Double, y: Double): Double
Link copied to clipboard
open fun projPointOntoLine(pt0: Mercator, lineEqn: LineEqn): Mercator
Link copied to clipboard
open fun rotationAngle(loc1: Mercator, loc2: Mercator): Double
Returns angle between two locations in radians clockwise from North
Link copied to clipboard
Link copied to clipboard
open fun sum(array: List<Double>): Double
Calculate the sum of a list of numbers.