Skip to content

EntityToCode/Entity-To-Code.JS-Source-2.3.2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Entity to code SourceForge

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

Download Entity-To-Code

New feats

2.3.2 (patch)

readme fix

2.3.1 (patch)

Quadratic Roots function Availible

2.3.0 (patch)

HALTED

2.2.3 (patch)

Readme update

2.2.2 (patch)

Readme update

2.2.1 (patch)

Readme update

2.2.0

successful model with c++ integration

2.1.0

Buggy prototype with c++ integration

2.0.0

Faulty prototype with c++ integration

1.0.0

Simple string msg

About

A mathematical library for various different mathematical functions (prod) backed by c++ (node-gyp/nan)

Installation

npm i entitytocode

printMsg

Versions: 1.0.0 +

Usage (nodeJS):

const package = require('entitytocode')
package.printMsg();

Output:

This is a message from the demo package

add

Versions: 2.0.0 +

Disclaimer: Not stable in versions 2.0.0 - 2.1.0

Types for parameters: Item1 = Int, Item2 = Int

Example (nodeJS):

const package = require('entitytocode')
const X = package.add(1, 2)
console.log(X)

Output:

3

Sub

Versions: 2.0.0 +

Disclaimer: Not stable in versions 2.0.0 - 2.1.0

Types for parameters: Item1 = Int, Item2 = Int

Example (nodeJS):

const package = require('entitytocode')
const X = package.sub(-1, 2)
console.log(X)

output:

-3

Mul

Versions: 2.0.0 +

Disclaimer: Not stable in versions 2.0.0 - 2.1.0

Types for parameters: Item1 = Int, Item2 = Int

Example (nodeJS):

const package = require('entitytocode')
const X = package.mul(-3.2, 2.3)
console.log(X)

output:

-7.359999999999999

Div

Versions: 2.0.0 +

Disclaimer: Not stable in versions 2.0.0 - 2.1.0

Types for parameters: Item1 = Int, Item2 = Int

Example (nodeJS):

const package = require('entitytocode')
const X = package.div(-1.5, 2)
console.log(X)

output:

 -0.75

Quadratic Roots

Versions: 2.3.1 +

Types for parameters: A = Int, B = Int, C = Int

Output: It returns an array with 3 values,
1: number of roots: If there are No roots then it will return 0, if there are one, then 1, if there are two then 2.
2 & 3: roots: In the calculation, two roots are returned, These are them, if there are only one root, both will be identical, and if there are none, item 1 will be 0 and it will return the imaginary roots

Example (nodeJS):

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')

output:

::::::::::::::::::::::::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