optimus_prime 0.0.1+3 copy "optimus_prime: ^0.0.1+3" to clipboard
optimus_prime: ^0.0.1+3 copied to clipboard

outdated

A library to aid working with prime numbers.

optimus_prime #

A library to aid working with prime numbers.

Import the Library #

import 'package:optimus_prime/optimus_prime.dart';

Library Examples: #

Extension Methods #

Check if an integer is prime:

2.isPrime();

Check if an integer is coprime with another

22.coprimeWith(21);

Optimus Prime class methods #

Get the first prime integer found after the specified number

OptimusPrime.primeAfter(28);

Get the first prime integer found before the specified number

OptimusPrime.primeBefore(3);

Get a list of prime integers within the specified range

List<int> primeList = OptimusPrime.primesInRange(from: 1,to: 1000);

Hecho en 🇵🇷 por Radamés J. Valentín Reyes

1
likes
0
pub points
5%
popularity

Publisher

unverified uploader

A library to aid working with prime numbers.

License

unknown (LICENSE)

Dependencies

flutter, meta

More

Packages that depend on optimus_prime