alustau/math

数学的有用工具

v1.0 2018-04-04 20:47 UTC

This package is not auto-updated.

Last update: 2024-09-20 19:45:09 UTC


README

这是一个旨在帮助开发者的项目。

目录

特性

  • 素数计算器

通过Composer安装

$ composer require alustau/math 

用法

使用简单,请参考以下示例

use Math\PrimeNumber;

$math = new PrimeNumber();

$math->isPrime(11); // true

//add a range from 1 to 100
$math->setNumbers(range(1,100));

$math->getPrimes(); // [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97]

$math->count();// 25