nt_math_utils 0.0.2 copy "nt_math_utils: ^0.0.2" to clipboard
nt_math_utils: ^0.0.2 copied to clipboard

A simple math utility library

math_utils #

A simple and efficient library for common mathematical operations in Dart.

This library provides several commonly used mathematical functions, making it easier to perform calculations in your Dart projects.

Features:

  • Calculate factorial of a non-negative integer.
  • Find the greatest common divisor (GCD) of two integers.
  • Calculate the least common multiple (LCM) of two integers.

Getting Started:

  1. Add math_utils as a dependency in your pubspec.yaml:
dependencies:
  math_utils: ^1.0.4
  1. Get dependencies:
dart pub get
  1. Import the library in your Dart code:
import 'package:math_utils/math_utils.dart';

void main() {
  print(MathUtils.factorial(5)); // Output: 120
  print(MathUtils.gcd(12, 18));  // Output: 6
  print(MathUtils.lcm(4, 6));   // Output: 12
}

Documentation:

Detailed documentation for each function is coming soon.

Contributing:

We welcome contributions to this library. Feel free to submit pull requests with bug fixes or new features.

License:

This library is licensed under the MIT License (see LICENSE file).

0
likes
150
points
47
downloads

Publisher

unverified uploader

Weekly Downloads

A simple math utility library

Documentation

API reference

License

MIT (license)

More

Packages that depend on nt_math_utils