Click or drag to resize

MathUtil Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
A collection of useful math functions.
Inheritance Hierarchy
SystemObject
  Telogis.GeoBaseMathUtil

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public class MathUtil

The MathUtil type exposes the following members.

Constructors
  NameDescription
Public methodMathUtil
Initializes a new instance of the MathUtil class
Top
Methods
  NameDescription
Public methodStatic memberAcosSafe
Calculate the arc-cosine (Acos) in radians with out-of-bounds check: if input > 1 use 1; if input < -1 use -1 as input.
Public methodStatic memberClamp(Double, Double, Double)
The closest value to a specified double that falls within a specified range.
Public methodStatic memberClamp(Int32, Int32, Int32)
The closest value to a specified integer that falls within a specified range.
Public methodStatic memberClampT(T, T, T)
Limits a value to a range.
Public methodStatic memberClosestPoint
Calculates the closest point on the line AB to the point given.
Public methodStatic memberClosestPointInPointCloud
Returns the point in the list which is closest to the query. Does not treat list as line.
Public methodStatic memberConvertUnits(Double, DistanceUnit, DistanceUnit)
Converts a distance from one distance unit to another.
Public methodStatic memberConvertUnits(Double, MassUnit, MassUnit)
Converts between two mass units.
Public methodStatic memberConvertUnits(Double, SpeedUnit, SpeedUnit)
Converts between two speed units.
Public methodStatic memberCode exampleConvertUnits(Double, TimeUnit, TimeUnit)
Converts between two time units.
Public methodStatic memberConvertUnitsInt
Convert a value from one distance unit to another, returning a rounded int result.
Public methodStatic memberDistance(IListLatLon, Int32, LatLon)
Returns the length (measured in radians) to the line segment of the 'points' array that lies closest to 'p'.
Public methodStatic memberDistance(IListLatLon, Int32, Int32, Int32, LatLon)
Calculates the segment in the 'points' array that lies closest to 'p'.
Public methodStatic memberDistanceFromPointToLine
The great circle distance from a point to a line lineStart->lineEnd in the given units.
Public methodStatic memberCode exampleDistToUnits
Convert from radians to a given Unit.
Public methodStatic memberEditDistance(String, String)
Gets the Levenshtein edit distance between two strings.
Public methodStatic memberEditDistance(String, String, MathUtilEditDistanceOptions)
Gets the Levenshtein or Damerau-Levenshtein edit distance between two strings.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodStatic memberGetHeading
Get the heading between LatLons.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberGreatCircle
Calculate the distance (in radians) between 2 latitude/longitude pairs over the surface of a sphere.
Public methodStatic memberHeadingDiff
Calculate the difference between two headings.
Public methodStatic memberInterpolate
Interpolate between two points.
Public methodStatic memberIsDaytime
Indicates whether a specified date time falls between sunrise and sunset at a specified location.
Public methodStatic memberKilogramsToUnits
Converts a given number of kilograms to its MassUnit equivalent.
Public methodStatic memberLatLonToEPSG3395
Convert from a LatLon point to x and y in EPSG:3395 co-ordinate space.
Public methodStatic memberLatLonToEPSG3857
Convert from a LatLon point to x and y in EPSG:3857 co-ordinate space.
Public methodStatic memberMaxT
Returns the maximum of one or more values.
Public methodStatic memberMinT
Returns the minimum of one or more values.
Public methodStatic memberMoveAhead
Given a starting position, a movement direction (as a bearing) and a distance, calculate the end position.
Public methodStatic memberNearlyEqual
Returns a boolean value that states whether or not two float values are equal within a certain tolerance.
Public methodStatic memberPythagoreanClosestPointOnLine(LatLon, LatLon, LatLon) Obsolete.
Public methodStatic memberPythagoreanClosestPointOnLine(LatLon, LatLon, LatLon, Double) Obsolete.
Public methodStatic memberPythagoreanDistanceFromPointToLine Obsolete.
Public methodStatic memberQuickClosestPointOnLine(LatLon, LatLon, LatLon)
Calculates the closest point on the line lineStart->lineEnd to the point given.
Public methodStatic memberQuickClosestPointOnLine(LatLon, LatLon, LatLon, Double)
Calculates the closest point on the line lineStart->lineEnd to the point given using a Pythagorean approximation.
Public methodStatic memberQuickDistanceFromPointToLine
Distance from point to line start->end using a Pythagorean approximation.
Public methodStatic memberRoundToIncrement
Returns a double value rounded to a specified increment. e.g. RoundToIncrement(23, 5) returns 25, RountToIncrement(23, 10) returns 20.
Public methodStatic memberRoundToSignificantFigures
Returns a double value rounded to a specified number of significant figures.
Public methodStatic memberSpeedToUnits
Converts a given speed from radians per second into the specified unit.
Public methodStatic memberTimeToUnits
Converts a given quantity of seconds to its TimeUnit equivalent. Thrown when the output_type TimeUnit is not recognized.
Public methodStatic memberToDegrees
Convert radians to degrees.
Public methodStatic memberToRadians
Convert degrees to radians.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodStatic memberCode exampleTruncate
Truncates a double value, removing any fractional digits.
Public methodStatic memberUnitsToKilograms
Converts a given mass unit to kilograms.
Public methodStatic memberUnitsToRadians(Double, DistanceUnit)
Convert a distance value from given units into radians.
Public methodStatic memberUnitsToRadians(Double, SpeedUnit)
Converts a given speed unit to radians per second.
Public methodStatic memberCode exampleUnitsToSeconds
Converts a given quantity of TimeUnits to its seconds equivalent.
Top
Fields
  NameDescription
Public fieldStatic memberMETERS_PER_NM
The number of meters in one international nautical mile.
Public fieldStatic memberMILES_PER_NM
The number of statute miles in one international nautical mile.
Public fieldStatic memberNM_PER_DEGREES
The number of international nautical miles in one degree along the Equator. 1 international nautical mile equals 1852m or 0.998383 equatorial arc minutes. Thus 1 equatorial arc degree equals 60.097177 international nautical miles. This differs from the geographical mile or historical nautical mile, which equal 1 arc minute along the equator or the meridian respectively.
Public fieldStatic memberPOUNDS_PER_KG
The number of avoirdupois pounds in a kilogram.
Top
See Also