nodephysics

1.1.4 • Public • Published

Node Physics

npm version downloads per month downloads all time

Physics is the natural science that studies matter and its motion and behavior through space and time and that studies the related entities of energy and force.

Installation

This is a Node.js module available through the npm registry.

Before installing nodephysics, download and install Node.js

Installation is accomplished using the npm install command:

$ npm i nodephysics

Usage

Node Physics is a very simple package to use:

var nodephysics = require("nodephysics");
 
var velocity = nodephysics.velocity(20, 5, true);
 
console.log(velocity);
 
// 4 m/s

Functions

Every function has a boolean input that allows you to choose whether or not to include units. You do not have to include the boolean, if you do not want the units listed.

Below is the list of possible functions, as well as their different inputs.

  1. .velocity(∆ position, ∆ time, boolean)
  2. .acceleration(∆ velocity, ∆ time, boolean)
  3. .weight(mass, gravity, boolean)
  4. .momentum(mass, velocity, boolean)
  5. .power(∆ work, ∆ time, boolean)

Package Sidebar

Install

npm i nodephysics

Weekly Downloads

0

Version

1.1.4

License

MIT

Unpacked Size

4.12 kB

Total Files

4

Last publish

Collaborators

  • alexreedyt