2.1.1 • Published 5 years ago

zigante v2.1.1

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

npm npm

Description

The official Zigante driver for Node.js. Provides a high-level API with the most important and most used math operations and geometric shapes.

Zigante Node.JS Driver

The recommended way to get started using the Node.js 3.0 driver is by using the npm (Node Package Manager) to install the dependency in your project.

Zigante Driver

Given that you have created your own project using npm init we install the Zigante driver and its dependencies by executing the following npm command.

npm install zigante --save

This will download the Zigante driver and add a dependency entry in your package.json file.

You can also use the Yarn package manager.

Troubleshooting

The Zigante driver depends on other packages. These are:

Quick Start

Create the package.json file

First, create a directory where your application will live.

mkdir myproject
cd myproject

Enter the following command and answer the questions to create the initial structure for your new project:

npm init

Next, install the driver dependency.

npm install zigante --save

You should see NPM download a lot of files. Once it's done you'll find all the downloaded packages under the node_modules directory.

Use Zigante

Create a new index.js file and add the following code to use the Zigante driver.

###MathOperations

//Example 01
import { mathOperations } from "zigante";

const sum = mathOperations.sum(5, 6, 7);

console.log(sum);

/** output:
 *  18
 */
//Example 02
import { mathOperations } from "zigante";

const bhaskara = mathOperations.bhaskara(1, 2, -3);

console.log(bhaskara);

/** output:
 *  {
 *   equation: '1x^2 + 2x + -3',
 *   delta: 16,
 *   x1: 1,
 *   x2: -3,
 *   solutions: [ 1, -3 ]
 *  }
 */

Run your app from the command line with:

npm start

The application should print the operations result to the console.

###GeoForms

//Example 01
import { geoShapes } from "zigante";

const rectangle = geoShapes.rectangle(2, 3);

console.log(rectangle);

/** output:
 *  {
 *   area: 6,
 *   perimeter: 13,
 *   diagonal: 3.605551275463989,
 *   base: 2,
 *   height: 3
 *  }
 */
//Example 02
import { geoShapes, mathOperations } from "zigante";

const perimeter = mathOperations.round(geoShapes.triangle.rectangle(3, 5).perimeter, 5);

console.log(perimeter);

/** output:
 *  13.83095
 */

Run your app from the command line with:

npm start

The application should print the operations result to the console.

Next Steps

License

© 2012-present Pedro Zigante Martim © 2012-present ZIGANTE

2.1.1

5 years ago

2.1.0

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.3

5 years ago

1.6.2

5 years ago

1.6.1

5 years ago

1.5.4

5 years ago

1.5.3

5 years ago

1.5.2

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago