pub struct Angle(pub f64);Expand description
📚 【 POL】: Izolator systemu typów przechowujący wartości kątowe w radianach. Zapobiega błędom jednostkowym. 📚 【 ENG】: Type system insulator storing angular values in radians. Prevents unit mismatch errors.
Tuple Fields§
§0: f64Trait Implementations§
Source§impl AbstractAngle for Angle
impl AbstractAngle for Angle
Source§fn from_rad(r: f64) -> Self
fn from_rad(r: f64) -> Self
📚 【 POL】: Tworzy instancję Angle bezpośrednio z wartości w radianach (Konstruktor bazowy). 📚 【 ENG】: Creates an Angle instance directly from a value in radians (Base constructor).
Source§fn from_deg(d: f64) -> Self
fn from_deg(d: f64) -> Self
📚 【 POL】: Tworzy instancję Angle z wartości w stopniach, dokonując konwersji na radiany. 📚 【 ENG】: Creates an Angle instance from a value in degrees, converting it to radians.
Source§fn from_pi_frac(fraction: f64) -> Self
fn from_pi_frac(fraction: f64) -> Self
📚 【 POL】: Tworzy instancję Angle jako wielokrotność liczby PI. 📚 【 ENG】: Creates an Angle instance as a multiple of PI.
Source§fn from_dms(d: i16, m: u8, s: f32) -> Self
fn from_dms(d: i16, m: u8, s: f32) -> Self
📚 【 POL】: Dekoduje format DMS (Stopnie, Minuty, Sekundy) do reprezentacji radianowej. 📚 【 ENG】: Decodes DMS (Degrees, Minutes, Seconds) format to radian representation.
⚠️ 【 POL】: Wykorzystanie i16 dla stopni uniemożliwia reprezentację “-0°” w formacie DMS. ⚠️ 【 ENG】: Using i16 for degrees prevents representation of “-0°” in DMS format.
Source§fn to_dms(self) -> (i16, u8, f32)
fn to_dms(self) -> (i16, u8, f32)
📚 【 POL】: Dekomponuje kąt z radianów do formatu DMS (Stopnie, Minuty, Sekundy). 📚 【 ENG】: Decomposes angle from radians to DMS (Degrees, Minutes, Seconds) format.
Source§fn rad(self) -> f64
fn rad(self) -> f64
📚 【 POL】: Zwraca wartość kąta w radianach (f64). Operacja bezkosztowa. 📚 【 ENG】: Returns angle value in radians (f64). Zero-cost operation.
Source§fn deg(self) -> f64
fn deg(self) -> f64
📚 【 POL】: Zwraca wartość kąta w stopniach (f64). 📚 【 ENG】: Returns angle value in degrees (f64).
Source§fn pi_frac(self) -> (f64, f64)
fn pi_frac(self) -> (f64, f64)
📚 【 POL】: Zwraca kąt jako ułamek liczby PI w postaci (licznik, mianownik). 📚 【 ENG】: Returns angle as a fraction of PI in (numerator, denominator) form.
Source§fn print_rad(self) -> String
fn print_rad(self) -> String
📚 【 POL】: Formatuje kąt jako ciąg znaków w radianach. Alokuje String. 📚 【 ENG】: Formats angle as a string in radians. Allocates String.
Source§fn print_deg(self) -> String
fn print_deg(self) -> String
📚 【 POL】: Formatuje kąt jako ciąg znaków w stopniach. Alokuje String. 📚 【 ENG】: Formats angle as a string in degrees. Allocates String.
Source§fn print_pi_frac(self) -> String
fn print_pi_frac(self) -> String
📚 【 POL】: Formatuje kąt jako ułamek liczby PI. Alokuje String. 📚 【 ENG】: Formats angle as a fraction of PI. Allocates String.