Files
2022-06-27 09:51:30 +08:00

20 lines
494 B
Dart
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'dart:math';
/// 角度处理工具类
class RadianUtils{
///弧度是角的度量单位 单位缩写是rad 360°角=2π弧度
///在Flutter中π 使用 [pi] 来表示 1弧度约为57.3°1°为π/180弧度
///弧度换算成角度 参数[radian]为弧度
static double radianToAngle(double radian) {
return radian * 180 / (pi);
}
///角度换算成弧度 参数[angle]为角度
static double angleToRadian(double angle) {
return angle * pi / 180;
}
}