Point.fromPolar constructor

Point.fromPolar(
  1. double radius,
  2. double angle
)

Creates a point from polar coordinates.

Implementation

factory Point.fromPolar(double radius, double angle) {
  return Point(
    radius * math.cos(angle),
    radius * math.sin(angle),
  );
}