GeometryUtils class

Utility functions for geometry operations.

This class provides common functionality for geometric calculations used throughout the package.

Constructors

GeometryUtils()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

angle(Offset point1, Offset point2) → double
Calculates the angle between two points in radians.
angleDegrees(Offset point1, Offset point2) → double
Calculates the angle between two points in degrees.
createPolygon(int sides, double radius, Offset center, [double rotation = 0]) → List<Offset>
Creates a regular polygon with the given number of sides.
createStar(int points, double outerRadius, double innerRadius, Offset center, [double rotation = 0]) → List<Offset>
Creates a star with the given number of points.
degreesToRadians(double degrees) → double
Converts degrees to radians.
distance(Offset point1, Offset point2) → double
Calculates the distance between two points.
isPointInPolygon(Offset point, List<Offset> polygon) → bool
Checks if a point is inside a polygon.
polygonArea(List<Offset> points) → double
Calculates the area of a polygon.
polygonPerimeter(List<Offset> points) → double
Calculates the perimeter of a polygon.
radiansToDegrees(double radians) → double
Converts radians to degrees.
rotatePoint(Offset point, Offset center, double angle) → Offset
Rotates a point around a center by the given angle.