@chemistry/math

Math support for @chemistry project

Usage no npm install needed!

<script type="module">
  import chemistryMath from 'https://cdn.skypack.dev/@chemistry/math';
</script>

README

@chemistry/math

npm version Build Status codecov License: MIT

Simple linear algebra Math library to support chemistry js project

Install

npm install @chemistry/math

Include following clases:

  • Vec3
  • Matrix3x3
  • Matrix3x4
  • Transform3d
  • Quaternion

Getting started:

import { V, ChemElementData } from '@chemistry/math';
const matrix = new Matrix3x3([1, 0, 0,  0, 2, 0,  0, 0, 3]);
const vector = new Vec3(2, 3, 1);

const res = matrix.project(vector);
// (2.00, 6.00, 3.00)
console.log(res);

Commands:

  • Build project: npm run build