Geoportal Extension for Leaflet API Reference

Module: MathUtils

Gp.MathUtils

...

Example

modulo();
decimalToDMS();
toInteger();
isInteger();
toFloat();

Methods

innerdecimalToDMS(degrees, hemispheres, numDigits){Object}

Common/Utils/MathUtils.js, line 27

Transform degrees, minutes, seconds form decimal degrees -
Largely inspired by the private function degreesToStringHDMS from ol/coordinate.js

Name Type Description
degrees Number

decimal degrees

hemispheres Array

"NS" ou "EO"

numDigits Number

number of digits for seconds

Returns:
coordinate

innerisInteger(s){Boolean}

Common/Utils/MathUtils.js, line 84

check if s represents an integer

Name Type Description
s String

string number

Returns:
integer

innermodulo(a, b){Number}

Common/Utils/MathUtils.js, line 15

Reste de la division euclidienne

Name Type Description
a Number

divisor

b Number

quotient

innertoFloat(s){null|Numeric}

Common/Utils/MathUtils.js, line 100

Converts s to float

Name Type Description
s String

string number

innertoInteger(s, base){null|Numeric}

Common/Utils/MathUtils.js, line 67

Converts string to Integer

Name Type Description
s String

string number

base Numeric

between 2 and 36