entitytocode
v2.3.2
Published
An npm library with physics and mathematical methods backed by c++
Downloads
2
Readme
Version | 1.0.0 | 2.0.0 | 2.1.0 | 2.2.0 | 2.3.0 | 2.3.1 --- | --- | --- | --- |--- |--- |--- Stable | Yes | No | No | Yes | Yes | Yes
npm i entitytocode
const package = require('entitytocode')
package.printMsg();
This is a message from the demo package
const package = require('entitytocode')
const X = package.add(1, 2)
console.log(X)
3
const package = require('entitytocode')
const X = package.sub(-1, 2)
console.log(X)
-3
const package = require('entitytocode')
const X = package.mul(-3.2, 2.3)
console.log(X)
-7.359999999999999
const package = require('entitytocode')
const X = package.div(-1.5, 2)
console.log(X)
-0.75
const moduleQRoots = require('entitytocode')
let NoRealRoots = moduleQRoots.roots(1, 2, 3)
console.info('::::::::::::::::::::::::NO REAL ROOTS::::::::::::::::::::::::')
console.log(NoRealRoots);
console.log('1X^2 + 2X + 3')
let OneRealRoot = moduleQRoots.roots(1, 2, 1)
console.info('::::::::::::::::::::::::ONE REAL ROOTS::::::::::::::::::::::::')
console.log(OneRealRoot);
console.log('1X^2 + 2X + 1')
let TworealRoots = moduleQRoots.roots(1, 3, 1)
console.info('::::::::::::::::::::::::TWO REAL ROOTS::::::::::::::::::::::::')
console.log(TworealRoots);
console.log('1X^2 + 3X + 1')
::::::::::::::::::::::::NO REAL ROOTS::::::::::::::::::::::::
[ 0, 0.41421356237309515, -2.414213562373095 ]
1X^2 + 2X + 3
::::::::::::::::::::::::ONE REAL ROOTS::::::::::::::::::::::::
[ 1, -1, -1 ]
1X^2 + 2X + 1
::::::::::::::::::::::::NO REAL ROOTS::::::::::::::::::::::::
[ 2, -0.3819660112501051, -2.618033988749895 ]
1X^2 + 3X + 1