Skip to content

Commit

Permalink
initial version migrated from pre-existing code; tag 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Jul 22, 2022
1 parent 52d09f6 commit 6affd76
Show file tree
Hide file tree
Showing 6 changed files with 1,126 additions and 113 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ jobs:
&& git clone https://github.com/calcit-lang/calcit-test.git
- name: "test"
run: cr -1 --entry test
run: cr -1

- run: cr --emit-js -1 --entry test && yarn && node ./main.mjs
- run: cr --emit-js -1 && yarn && node ./main.mjs
47 changes: 30 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,44 @@
## Quaternion Math for Calcit

Calcit Workflow
----
TODO.

> running in both Calcit and Calcit-js, with hot code reload.
Function names are boring since Calcit lacks performance polymorphism. You might want [Quaternion in Rust](https://github.com/Quatrefoil-GL/quaternions/).

### Usages

Install [Calcit](https://github.com/calcit-lang/calcit) to run demo:
In `quaternion.core`:

```bash
cr -1 # run once
Complex math:

cr # run and watch
```
- `&c*`
- `&c+`
- `&c-`
- `c-conjutate`
- `c-length`
- `c-length2`

run tests:
Vector:

```bash
cr -1 --entry test
```
- `&v+`
- `&v-`
- `v+`
- `v-`
- `v-scale`

run test in JavaScript:
Quaternion math:

```bash
cr --emit-js -1 --entry test # emit-js once
node main.mjs # run code
```
- `&q*`
- `&q+`
- `&q-`
- `q+`
- `q-`
- `q-conjugate`
- `q-inverse`
- `q-length`
- `q-length2`
- `q-scale`

> Notice: Quaternion in this library looks like `[] x y z w` since original usage was in three.js .
### Workflow

Expand Down
Loading

0 comments on commit 6affd76

Please sign in to comment.