Skip to content

Conversation

@clhenrick
Copy link

to resolve #2

@clhenrick
Copy link
Author

@Fil I need to test this out still, so not ready to merge yet.

@clhenrick
Copy link
Author

Seems to work for me when I import this branch into a Typescript project:

import versor = require("versor");

const v0 = versor([ 0, 0, 0 ]);
const v1 = versor([ 90, 0, 0 ]);

const delta = versor.delta(v0, v1);

const delta2 = versor.delta(v0, v1, 0.5);

const cartesian = versor.cartesian([-80, 44]);

const rotation = versor.rotation([10, 30, 40, 4]);

const multiply = versor.multiply([10, 20, 30, 40], [0, 20, 30, 50]);

// typescript yells at this for example
versor.delta("a", "b");

// it also yells about this
versor("a");

// and this
versor.multiply([0, 1, 2]);

@clhenrick
Copy link
Author

clhenrick commented Oct 12, 2018

in Typescript if you use the import * as versor from "versor" method then you need to use versor.default() to do the equivalent of versor() as when using common js var versor = require("versor").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Request for type definition file

2 participants