cad_cs/libs/angle/model.rs
1// 📃 src/libs/angle/model.rs
2
3/// 📚 【 POL】: Izolator systemu typów przechowujący wartości kątowe w radianach. Zapobiega błędom jednostkowym.
4/// 📚 【 ENG】: Type system insulator storing angular values in radians. Prevents unit mismatch errors.
5#[derive(Debug, Clone, Copy, PartialEq, PartialOrd)]
6pub struct Angle(pub f64);
7
8/// 📚 【 POL】: Definicja dostępnych formatów prezentacji kąta.
9/// 📚 【 ENG】: Definition of available angle presentation formats.
10#[derive(Debug, Clone, Copy, Default)]
11pub enum AngleFmt {
12 #[default]
13 /// 📚 【 POL】: Stopnie (np. 90.00°)
14 /// 📚 【 ENG】: Degrees (e.g., 90.00°)
15 Deg,
16 /// 📚 【 POL】: Radiany (np. 1.5708 rad)
17 /// 📚 【 ENG】: Radians (e.g., 1.5708 rad)
18 Rad,
19 /// 📚 【 POL】: Ułamki liczby PI (np. 1/2 π)
20 /// 📚 【 ENG】: PI Fractions (e.g., 1/2 π)
21 PiFrac,
22}