Skip to content

Calculus is a PHP library for mathematics/2D/3D computing

License

Notifications You must be signed in to change notification settings

Zazalt/Calculus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculus

Build Status Coverage Status Code Climate Issue Count Total Downloads Latest Stable Version Version

Calculus is a PHP library for mathematics/2D/3D computing

Requirements

  • php >= 7.1.0

Packagist Dependencies

  • None

Installation

With composer:

{
	"require": {
		"zazalt/calculus": "dev-master"
	}
}

Usage

$Calculus = new Zazalt\Calculus\Calculus();

/**
 * Check if a nunmber is prime based on trial division
 *
 * @return  boolean
 */
$Calculus->isPrimeNumber($number);

/**
 * Calculating distance between two points on a flat plane
 *
 * @return  integer
 */
$Calculus->distanceBetweenTwoPoints($pointA = [], $pointB = []);

/**
 * Resize a rectangle object until it falls in desired dimension, but keep aspect ratio
 * A usefull function/method when want to resize an image
 *
 * @return  array
 */
$Calculus->resizeRectangle($rectangleDimensions = [], $rectangleNewDimensions = []);

/**
 * Not implemented/documented, yet!
 */
$Calculus->mean();

/**
 * Not implemented/documented, yet!
 */
$Calculus->median();

/**
 * Not implemented/documented, yet!
 */
$Calculus->mode();

About

Calculus is a PHP library for mathematics/2D/3D computing

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages