Skip to content

Commit

Permalink
Merge pull request #8 from traveltime-dev/fix/proto-location-deltas
Browse files Browse the repository at this point in the history
fix proto location deltas
  • Loading branch information
MockusT authored Oct 6, 2022
2 parents aa166a1 + 98abdd8 commit 8172223
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/client/protoClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8172223

Please sign in to comment.