diff --git a/package-lock.json b/package-lock.json index 9c335ef..bd91732 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "traveltime-api", - "version": "2.4.0", + "version": "2.4.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "traveltime-api", - "version": "2.4.0", + "version": "2.4.1", "license": "MIT", "dependencies": { "axios": "^0.27.2", diff --git a/package.json b/package.json index c47aa31..185aba1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "traveltime-api", - "version": "2.4.0", + "version": "2.4.1", "description": "TravelTime API SDK for node js with TypeScript", "main": "target/index.js", "types": "target/index.d.ts", diff --git a/src/client/protoClient.ts b/src/client/protoClient.ts index b230b0e..66a9dcd 100644 --- a/src/client/protoClient.ts +++ b/src/client/protoClient.ts @@ -63,7 +63,7 @@ export class TravelTimeProtoClient { } private encodeFixedPoint(sourcePoint: number, targetPoint: number) { - return Math.round((targetPoint - sourcePoint) * 1000000); + return Math.round((targetPoint - sourcePoint) * (10 ** 5)); } private buildRequestUrl(uri: string, { country, transportation }: TimeFilterFastProtoRequest): string {