Skip to content

Nexapp/NexappMath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nexapp Math

Build Status

Nexapp's math library.

Provided by the library

Units

Angle: degrees or radians, plus some useful methods
Duration: from nanoseconds to centuries, allows conversion
Length: from miles to millimeters, allows conversion
Mass: from tonnes to ounces, allows conversion
Percentage: handle percentage from its two forms: 83% (ratio) or 0.65 (fraction)
Point: cartesian or polar, plus some useful methods
Temperature: Celsius, Fahrenheit or Kelvin, allows conversion
Coordinates: Geographical locations, distance between locations, etc. DigialStorage: from bits to petabytes

Functions

Line: in a 2D plane (mx + b), with many useful methods
Quadratic: 2nd degree function
Cubic: 3rd degree function
Quartic: 4th degree function

Shapes

Rectangle: easy instantiation. Manages: corners, center point, dimensions and rectangle intersections.

Roadmap

Units

Volume (litres, millilitres, pint, gallons, tablespoon, teaspoon, etc.)

Shapes

Triangle
Circle
Ellipse

Functions

Segment

Bezier curves

Quadratic bezier curve (2nd degree)
Cubic bezier curve (3rd degree)
Spline

Intersections

Between shapes
Between functions

How to use it

At the moment, this project is hosted on GitHub and not on Maven Central.

In your pom.xml, you must add the GitHub repository as follows:

<repositories>
	<repository>
		<id>nexapp-math-mvn-repo</id>
		<url>https://raw.github.com/nexapp/nexappmath/mvn-repo/</url>
	</repository>
</repositories>

Then, you simply add the dependency as follows:

<dependency>
	<groupId>ca.nexapp</groupId>
	<artifactId>math</artifactId>
	<version>0.0.8</version>
</dependency>