Converts an angle from radians to degrees.

Use pi and the radian to degree formula to convert the angle from radians to degrees.

代码实现

import 'dart:math';

num radsToDegrees(num rad) {
  return (rad * 180.0) / pi;
}

使用样例

radsToDegrees(pi / 2); // 90