Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 700 Bytes

README.md

File metadata and controls

35 lines (24 loc) · 700 Bytes

libm

An AssemblyScript example. Exposes AssemblyScript's math routines for double and single precision as a library.

const libm = require("path/to/libm");
const libmf = libm.libmf;
...

Both libm and libmf have the same general interface as JavaScript's Math, with libmf doing single precision math.

Instructions

First, install the development dependencies:

$> npm install

Now, to build assembly/libm.ts to build/libm.wasm respectively assembly/libmf.ts to build/libmf.wasm, run:

$> npm run asbuild

Afterwards, run

$> npm test

to verify that it works.