rapid-sdk
    Preparing search index...

    Module @rapid-sdk/math

    đŸ§ŗ Collection of rapid-sdk math libraries

    npm version

    @rapid-sdk/math

    đŸ§ŗ The rapid-sdk math library

    For example, in Node.js: npm install @rapid-sdk/math

    This library is distributed in CJS and ESM module formats for maximum compatibility. (Read more about JavaScript module formats)

    const math = require('@rapid-sdk/math');           // CommonJS import all
    const Extent = require('@rapid-sdk/math').Extent; // CommonJS import named
    // or
    import * as math from '@rapid-sdk/math'; // ESM import all
    import { Extent } from '@rapid-sdk/math'; // ESM import named
    • â­ī¸ constants.ts: Math Constants
    • đŸ“Ļ Extent.ts: Extent class for working with bounding boxes
    • 🌐 geo.ts: Geographic (spherical) math functions
    • 📈 geom.ts: Geometric (planar) math functions
    • đŸ”ĸ number.ts: Number math functions
    • đŸ“Ŋī¸ proj.ts: Projection math functions
    • đŸ€„ī¸ Tiler.ts: Tiler class for splitting the world into rectangular tiles
    • đŸ•šī¸ Transform.ts: Transform class for managing translation, zoom, rotation
    • 💭 types.ts: TypeScript Types
    • 📐 vector.ts: Vector math functions
    • đŸ“ē Viewport.ts: Viewport class for managing view state and converting between Lon/Lat [Îģ,Ά] and Cartesian [x,y] coordinates

    See the CONTRIBUTING.md file for more info.

    Classes

    Extent
    Tiler
    Transform
    Viewport

    Interfaces

    BBox
    Closest
    Edge
    SurroundingRectangle
    Tile
    TileResult
    TransformProps

    Type Aliases

    Quad
    Vec2
    Vec3
    Vec4

    Variables

    ANGLE_EPSILON
    DEG2RAD
    EQUATORIAL_RADIUS
    HALF_PI
    MAX_PHI
    MAX_Z
    MIN_PHI
    MIN_Z
    POLAR_RADIUS
    QUARTER_PI
    RAD2DEG
    TAU
    WORLD_HALF
    WORLD_SCALE
    WORLD_SIZE
    WORLD_ZOOM

    Functions

    geoLatToMeters
    geoLonToMeters
    geomEdgeEqual
    geoMetersToLat
    geoMetersToLon
    geoMetersToOffset
    geomGetDominantSurroundingRectangle
    geomGetSmallestSurroundingRectangle
    geomGetSurroundingRectangle
    geomLineIntersection
    geomPathHasIntersections
    geomPathIntersections
    geomPathLength
    geomPointInPolygon
    geomPolygonContainsPolygon
    geomPolygonIntersectsPolygon
    geomReflect
    geomRotate
    geomScale
    geomToLocal
    geomToOrigin
    geoOffsetToMeters
    geoScaleToZoom
    geoSphericalClosestPoint
    geoSphericalDistance
    geoZoomToScale
    numClamp
    numWrap
    projScreenToWorld
    projWgs84ToWorld
    projWorldToScreen
    projWorldToWgs84
    vecAdd
    vecAngle
    vecCeil
    vecCross
    vecDot
    vecEqual
    vecFloor
    vecInterp
    vecLength
    vecLengthSquare
    vecNormalize
    vecNormalizedDot
    vecProject
    vecRotate
    vecRound
    vecScale
    vecSubtract
    vecTrunc