MathUtils: {
    convertDistance: (distance: number) => string;
    convertSecondsToTime: (duration: number) => string;
    decimalToDMS: (
        degrees: number,
        hemispheres: any[],
        numDigits: number,
    ) => any;
    isInteger: (s: string) => boolean;
    modulo: (a: number, b: number) => number;
    toFloat: (s: string) => any;
    toInteger: (s: string, base: Numeric) => any;
    coordinateToDecimal(olCoordinate: any): any;
    coordinateToDMS(olCoordinate: any): any;
    coordinateToGon(olCoordinate: any): any;
    coordinateToKMeter(olCoordinate: any): any;
    coordinateToMeter(olCoordinate: any): any;
    coordinateToRad(olCoordinate: any): any;
    dmsToDecimal(
        degrees: any,
        minutes: any,
        seconds: any,
        hemispheres: any,
    ): number;
} = ...

Type declaration

  • convertDistance: (distance: number) => string

    convert distance in meters or kilometers

  • convertSecondsToTime: (duration: number) => string

    convert seconds to time : HH:MM:SS

  • decimalToDMS: (degrees: number, hemispheres: any[], numDigits: number) => any

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

    decimalToDMS

  • isInteger: (s: string) => boolean

    check if s represents an integer

    isInteger

  • modulo: (a: number, b: number) => number

    Reste de la division euclidienne

    modulo

  • toFloat: (s: string) => any

    Converts s to float

    toFloat

  • toInteger: (s: string, base: Numeric) => any

    Converts string to Integer

    toInteger

  • coordinateToDecimal:function
    • ol coordinate to decimal

      Parameters

      • olCoordinate: any

        see ol/coordinate.js

      Returns any

      • {lat, lng, unit:°}

      coordinateToDecimal

  • coordinateToDMS:function
    • ol coordinate to dms

      Parameters

      • olCoordinate: any

        see ol/coordinate.js

      Returns any

      • {lat, lng, unit:dms}

      coordinateToDMS

  • coordinateToGon:function
    • ol coordinate to gon

      Parameters

      • olCoordinate: any

        see ol/coordinate.js

      Returns any

      • {lat, lng, unit:gon}

      coordinateToGon

  • coordinateToKMeter:function
    • ol coordinate to kilometer

      Parameters

      • olCoordinate: any

        see ol/coordinate.js

      Returns any

      • {x, lyng, unit:km}

      coordinateToKMeter

  • coordinateToMeter:function
    • ol coordinate to meter

      Parameters

      • olCoordinate: any

        see ol/coordinate.js

      Returns any

      • {x, y, unit:m}

      coordinateToMeter

  • coordinateToRad:function
    • ol coordinate to rad

      Parameters

      • olCoordinate: any

        see ol/coordinate.js

      Returns any

      • {lat, lng, unit:rad}

      coordinateToRad

  • dmsToDecimal:function
    • Transform decimal degrees form degrees, minutes, seconds

      Parameters

      • degrees: any

        degrees

      • minutes: any

        minutes

      • seconds: any

        seconds

      • hemispheres: any

        "NS" ou "EO"

      Returns number

      decimal coordinate

      dmsToDecimal