math_helper 0.0.5 copy "math_helper: ^0.0.5" to clipboard
math_helper: ^0.0.5 copied to clipboard

A Flutter package to create and calculate various geometric relationships on coordinate.

Provides standard geometry mathematical functions including circle and linear equations, still updating. It is very helpful while drawing lines and shapes on canvas.

Features #

  1. Provide linear equation.
  2. Provide circle equation.
  3. Calculate the relations among linear, circle equation and points.

Contents #

Usage #

Linear Euation #

final line = MathHelper.getLineEquation(offset1, offset2);

Circle Equation #

offset is center point, radius is radius of the circle.

final circle = MathHelper.getCircleEquation(offset, radius);

Distance #

/// Calculate the distacne between two point
final distance = MathHelper.getDistanceBetweenTwoPoint(offset1, offset2);
/// Find the point of intersection between the given point and the given line perpendicular to it
final distance = MathHelper.getPointVerticalToLine(line, offset);

Intersections #

/// Intersection between Line and Circle
final points = MathHelper.getIntersectionBetweenCircleAndLine(line, circle);
/// Get the perpendicular equation from p1 and given linear equation
final line = MathHelper.getIntersection(line, offset);
/// Get the intersection point of two linear equation, if there is no intersection point, will return null
final point = MathHelper.getTwoLineIntersection(line, line2);
/// Find the point of intersection between the given point and the given line perpendicular to it
final point = MathHelper.getPointVerticalToLine(line, offset);
1
likes
160
points
19
downloads

Documentation

API reference

Publisher

verified publisher66catknight-flutter.com

Weekly Downloads

A Flutter package to create and calculate various geometric relationships on coordinate.

Repository (GitHub)

License

MIT (license)

Dependencies

flutter, tuple

More

Packages that depend on math_helper