pointAtDistance method

Point pointAtDistance(
  1. double distance, [
  2. double angle = 0
])

Get the point at a distance to this point

result of the other point is depended on the distance and the angle between them 2 default angle is 0

Implementation

Point pointAtDistance(double distance, [double angle = 0]) {
  final x1 = x + distance * cos(angle);
  final y1 = y + distance * sin(angle);
  return Point(x1, y1);
}