Skip to content

Commit

Permalink
Update example to match Go implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ezzatron committed May 28, 2024
1 parent ce2bc3c commit cc87b67
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/vitest/examples/example-06.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ test("Example 6", () => {
// PROBLEM:

// Given the position of B at time t0 and t1, pt0 and pt1:
const t0 = 10;
const t1 = 20;
const ti = 16;
const t0 = 10,
t1 = 20,
ti = 16;
const pt0 = fromGeodeticCoordinates(radians(89.9), radians(-150));
const pt1 = fromGeodeticCoordinates(radians(89.9), radians(150));

Expand All @@ -31,7 +31,7 @@ test("Example 6", () => {

// SOLUTION:

// Standard interpolation can be used directly with n-vector:
// Standard interpolation can be used directly with n-vectors:
const pti = normalize(
apply((pt0, pt1) => pt0 + ((ti - t0) * (pt1 - pt0)) / (t1 - t0), pt0, pt1),
);
Expand Down

0 comments on commit cc87b67

Please sign in to comment.