import { Complex } from './Complex' | |
export function complexSpec() { | |
describe("constructor", function() { | |
const x = Math.random() | |
const y = Math.random() | |
const z = new Complex(x, y) | |
it("should preserve real argument", function() { | |
expect(z.real).toBe(x) | |
}) |
function wedge(a: number[], b: number[]): number[] { | |
const result: number[] = []; | |
const aLen = a.length; | |
const bLen = b.length; | |
for (let i = 0; i < aLen; i++) { | |
result.push(a[i]); | |
} | |
for (let i = 0; i < bLen; i++) { | |
result.push(b[i]); | |
} |
This is a starter project for creating Computational Projects for learning geometry, kinematics and dynamics.
A student develops their own Vector3
class for describing the position and velocity of objects in 3D. This class then becomes the basis for future projects. Vector3
is a springboard to Geometric3
, a geometric object for Euclidean space using Geometric Algebra.
The Vector3
class in the file Vector3.ts
is initially nothing more than a triple of Cartesian coordinates. The goal is to develop the Vector3
class into a mathematical object supporting coordinate-free geometry. The student develops an appreciation of the power of geometric objects for representing physical laws.
This is a starter project for creating Computational Projects for learning geometry, kinematics and dynamics.
A student develops their own Vector3
class for describing the position and velocity of objects in 3D. This class then becomes the basis for future projects. Vector3
is a springboard to Geometric3
, a geometric object for Euclidean space using Geometric Algebra.
The Vector3
class in the file Vector3.ts
is initially nothing more than a triple of Cartesian coordinates. The goal is to develop the Vector3
class into a mathematical object supporting coordinate-free geometry. The student develops an appreciation of the power of geometric objects for representing physical laws.
/** | |
* Scratch variable for implementing the rotate method. | |
*/ | |
const R = EIGHT.Geometric3.zero(); | |
/** | |
* Heading | |
*/ | |
const INDEX_H = 0; | |
/** | |
* Left |