Skip to main content

Angle

Struct Angle 

Source
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: f64

Trait Implementations§

Source§

impl AbstractAngle for Angle

Source§

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

📚 【 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

📚 【 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

📚 【 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)

📚 【 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

📚 【 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

📚 【 POL】: Zwraca wartość kąta w stopniach (f64). 📚 【 ENG】: Returns angle value in degrees (f64).

Source§

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

📚 【 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

📚 【 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

📚 【 POL】: Formatuje kąt jako ułamek liczby PI. Alokuje String. 📚 【 ENG】: Formats angle as a fraction of PI. Allocates String.

Source§

impl Clone for Angle

Source§

fn clone(&self) -> Angle

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Angle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Angle

Source§

fn eq(&self, other: &Angle) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Angle

Source§

fn partial_cmp(&self, other: &Angle) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for Angle

Source§

impl StructuralPartialEq for Angle

Auto Trait Implementations§

§

impl Freeze for Angle

§

impl RefUnwindSafe for Angle

§

impl Send for Angle

§

impl Sync for Angle

§

impl Unpin for Angle

§

impl UnsafeUnpin for Angle

§

impl UnwindSafe for Angle

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.