degreesToRadians function

num degreesToRadians(
  1. num degrees
)

Converts an angle in degrees to radians

Implementation

num degreesToRadians(num degrees) {
  num radians = degrees.remainder(360);
  return radians * pi / 180;
}