Allows to compute the least common multiple and the greatest common divisor.

v0.1 2016-03-12 16:05 UTC

This package is not auto-updated.

Last update: 2024-05-17 16:53:34 UTC


README

Allows to compute:

  • the least common multiple
  • the greatest common divisor

Usage

<?php
use lukaszmakuch\Math;

//the least common multiple
echo Math::lcm(3, 4); //12

//the greatest common divisor
echo Math::gcd(8, 12); //4

Getting the library

$ composer require lukaszmakuch/math