mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[geodesy] Fix decimal point type (#45747)
Before this commit, the Dp type (decimal point) was limiting values to 0, 2, and 4. These values are actually default values only, but geodesy supports any number of decimal points. See https://github.com/chrisveness/geodesy/issues/83
This commit is contained in:
parent
373578f2d8
commit
3252bb429b
@ -54,23 +54,23 @@ Dms.parse('51° 28′ 40.12″ N');
|
||||
|
||||
Dms.toDms(45);
|
||||
Dms.toDms(45, 'dm');
|
||||
Dms.toDms(45, 'd', 2);
|
||||
Dms.toDms(45, 'dms', 4);
|
||||
Dms.toDms(45, 'd', 1);
|
||||
Dms.toDms(45, 'dms', 3);
|
||||
|
||||
Dms.toLat(45);
|
||||
Dms.toLat(45, 'dm');
|
||||
Dms.toLat(45, 'd', 2);
|
||||
Dms.toLat(45, 'dms', 4);
|
||||
Dms.toLat(45, 'd', 1);
|
||||
Dms.toLat(45, 'dms', 3);
|
||||
|
||||
Dms.toLon(45);
|
||||
Dms.toLon(45, 'dm');
|
||||
Dms.toLon(45, 'd', 2);
|
||||
Dms.toLon(45, 'dms', 4);
|
||||
Dms.toLon(45, 'd', 1);
|
||||
Dms.toLon(45, 'dms', 3);
|
||||
|
||||
Dms.toBrng(90);
|
||||
Dms.toBrng(90, 'dm');
|
||||
Dms.toBrng(90, 'd', 2);
|
||||
Dms.toBrng(90, 'dms', 4);
|
||||
Dms.toBrng(90, 'd', 1);
|
||||
Dms.toBrng(90, 'dms', 3);
|
||||
|
||||
Dms.compassPoint(180);
|
||||
Dms.compassPoint(180, 1);
|
||||
|
||||
2
types/geodesy/index.d.ts
vendored
2
types/geodesy/index.d.ts
vendored
@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
export type Format = 'd' | 'dm' | 'dms';
|
||||
export type Dp = 0 | 2 | 4;
|
||||
export type Dp = number;
|
||||
|
||||
export interface Plural<T> {
|
||||
[itemName: string]: T;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user