npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mathrry

v0.2.15

Published

Simple Math Module

Readme

mathrry

Issues Stars Forks Downloads License

Simple Math Module

Usage

Basic arithmetic operations

Addition: mathrry.add
Subtraction: mathrry.sub
Multiplication: mathrry.multi
Division: mathrry.divi

Extra

mathrry.revdivi
mathrry.revmulti

mathrry.revdivi is calculated by inverting the value. Think of it as the opposite of mathrry.divi.

mathrry.revmulti also same as above.

2D

Coordinate things

Points

The Distance between two points

mathrry.Dbtp(x1,y1,x2,y2)

x1, x1 are the coordinates of the first point, x2, y2 are the coordinates of the second point.

The Distance between point and line

mathrry.Dbptl(x,y,exp-a,exp-b,exp-c)

x,y are the coordinates of the point, exp-a, exp-b exp-c are from ax+by+c=0. Put it in order.

Triangle

Centroid of Triangle

mathrry.CoT(x1,y1,x2,y2,x3,y3)
Extra
mathrry.CoTx(x1,y1,x2,y2,x3,y3)
mathrry.CoTy(x1,y1,x2,y2,x3,y3)

mathrry.CoTx returns the x-coordinate value of the centroid of triangle.
mathrry.CoTy returns the y-coordinate value of the centroid of triangle.

x1, y1 are the coordinates of the first point, x2, y2 are the coordinates of the second point, and x3, y3 are the coordinates of the third point.

Area things

Triangle

The Area of triangle with 3 points

mathrry.Aotw3p(x1,y1,x2,y2,x3,y3)

x1, y1 are the coordinates of the first point, x2, y2 are the coordinates of the second point, and x3, y3 are the coordinates of the third point.

The Area of triangle with 3 line segments

mathrry.Aotw3ls(l1, l2, l3)

l1, l2, and l3 are the lengths of the sides of the triangle, respectively.

Circle

Area of Circle

mathrry.AoC(r)

r is the radius of the circle for which you want to know the area.

3D

Coordinate things

Points

The Distance between two points in 3D

mathrry.TDbtp(x1,y1,z1,x2,y2,z2)

x1, x1, z1 are the coordinates of the first point, x2, y2, z2 are the coordinates of the second point.

Cube

The Diagonal of the cube

mathrry.TdoC(l)

l is the length of one side of the cube.

Volume of Cube

mathrry.TVoC(l)

l is the length of one side of the cube.

Sphere

Volume of Sphere

mathrry.TVoS(r)

r is the radius of Sphere.

Physics

Force

F = ma

mathrry.F(m,a)

m is the mass of an object. a is the Acceleration of an object.

Extra

m = F/a
mathrry.Fm(f,a)

Finding the mass of an object by force and acceleration.

a = F/m
mathrry.Fa(f,m)

Finding the acceleration of an object by force and mass.

S = V0t + 1/2at^2

mathrry.S(v,a,t)

v is the initial velocity of an object. t is the time of the force was applied to the object. a is the Acceleration of an object.

Extra

V0 = (S - 1/2at^2)/t
mathrry.Sv(s,a,t)

s is the moving space of the object. a is the Acceleration of an object. t is the time of the force was applied to the object.

a = (s - v0t)/(0.5t^2)
mathrry.Sa(s,v,t)

s is the moving space of the object. v is the initial velocity of an object. t is the time of the force was applied to the object.

2as = v^2 - v0^2

mathrry.A(v0,v,s)

v0 is the initial velocity of an object. v is the later speed of the object. s is the moving space of the object.