extended_math 0.0.12 extended_math: ^0.0.12 copied to clipboard
Library that add functionality of all maths sections that don't exist in dart:math.
example/extended_math_example.dart
import 'package:extended_math/extended_math.dart';
void main() {
final v1 = Vector(<double>[1, 2, 3]);
final v2 = Vector(<double>[4, 5, 6]);
// Multiply vectors
final double res = v1.dotProduct(v2);
// Add vectors
final Vector res1 = v1 + v2;
final v5 = Vector(<double>[6, 3]);
final v6 = Vector(<double>[5, 13]);
// Gets angle between two vectors
print(v5.angleBetween(v6));
final v3 = SquareMatrix(<List<double>>[
<double>[9, 3, 5],
<double>[-6, -9, 7],
<double>[-1, -8, 1]
]);
// Gets determinant of matrix
final double det = v3.determinant();
final m = Matrix(<List<double>>[
<double>[2, -1, 5],
<double>[0, 2, 1],
<double>[3, 1, 1]
]);
// Compute Frobenius norm of matrix
print(m.frobeniusNorm());
}