A class that contains mathematical utility functions.
-
clamp: Constrain (or clamp) a numeric value between two bounds.
MSMath::clamp(mixed $value, mixed $min, mixed $max): int|float
-
lerp: Linearly interpolate between two values.
MSMath::lerp(float $start, float $end, float $t): float
-
inverseLerp: Calculate the inverse linear interpolation of a value between two bounds.
MSMath::inverseLerp(float $start, float $end, float $value): float
-
remapRange: Remap a value from one range to another.
MSMath::remapRange(float $value, float $oldMin, float $oldMax, float $newMin, float $newMax): float
-
mean: Calculate the mean of an array of numbers.
MSMath::mean(array $values): float
A class that contains geohash utility functions.
-
encode: Encode a latitude and longitude into a geohash string.
MSGeoHash::encode(float $latitude, float $longitude, int $precision = 12): string
-
decode: Decode a geohash string into a latitude and longitude.
MSGeoHash::decode(string $hash): array
-
distance: Calculate the distance between two geohash strings. Returns the distance in kilometers.
MSGeoHash::distance(string $hash1, string $hash2): float
-
neighbor: Calculate the neighbor of a geohash string in a given direction (N, S, E, W, NW...).
MSGeoHash::neighbor(string $hash, string $direction): string
-
neighbors: Calculate the neighbors of a geohash string in all directions (N, S, E, W, NW...).
MSGeoHash::neighbors(string $hash): array
A class that contains miscellaneous functionality.
-
toExcelColumn: Convert a number to an Excel column name.
MSMisc::toExcelColumn(int $number): string
-
fromExcelColumn: Convert an Excel column name to a number.
MSMisc::fromExcelColumn(string $column): int
- Build the extension:
docker-compose -f docker-compose.build.yml up --build
- Start nginx/php:
docker-compose -f docker-compose.runtime.yml up --build
- Access the extension:
- Open your browser and navigate to
http://localhost:8080/
- Edit
www/index.php
to make changes.
- Open your browser and navigate to