Latitude
Latitude value object.
Import
typescript
import { Latitude } from '@haskou/value-objects';Signature
typescript
class Latitude extends NumberValueObjectConstructor
typescript
constructor(value: number | NumberValueObject)Validation
Must be between -90 and 90, inclusive.
Throws
This class can throw:
InvalidLatitudeError
Example
typescript
import { Latitude } from '@haskou/value-objects';
const latitude = new Latitude(41.3888);
latitude.valueOf(); // 41.3888Notes
- Accepts primitive numbers and
NumberValueObjectinstances.