num_extension 1.0.0

Flutter Android iOS web

A set of mathematical calculations on `num` and `List<num>` objects - using Dart Extension Methods.

example/num_extension_example.dart

import 'package:num_extension/src/extension.dart';

void main() {

  // `num` Extensions
  print(1.plus(3));
  print(3.minus(4));
  print(3.plusList([2, 1, -4, 8]));
  print(27.minusList([9, -2, 9, 4]));
  print(2.1.plus(4).times(2));
  print(1.plus(3.1).div(7).times(2));
  print(4.div(2).times(3).minus(4.5).plus(3).plusList([2, 8, 4, 5]));
  print(3.plusList([2, 3, -5, 2.2]));
  print(3.minusList([2, 3, -5, 2.2]));


  // `List<num>` Extensions
  print([2, 3, 1, -12.1].sum);
  print([2, 3, 1, -12].min);
  print([2, 3, 1, -12].max);
  print([2, 3, 1, -12].average);
  print([2, 3, 1, -12].sum.plusList([2, 4]).minus(4).div(2));

}
1
likes
100
pub points
47%
popularity

A set of mathematical calculations on `num` and `List<num>` objects - using Dart Extension Methods.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

abayomidami@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on num_extension