Struct vek::geom::repr_simd::Disk [−][src]
pub struct Disk<P, E> {
pub center: Vec2<P>,
pub radius: E,
}
Expand description
Disk (2D), represented by center and radius.
Fields
center: Vec2<P>
radius: E
Implementations
pub fn circumference(self) -> E where
E: Copy + FloatConst + Mul<Output = E> + Add<Output = E>,
pub fn circumference(self) -> E where
E: Copy + FloatConst + Mul<Output = E> + Add<Output = E>,
Gets this disk’s circumference.
Gets this disk’s area.
Creates a new
Disk
from center
and a radius
equal to one.
Creates a new
Disk
from center
and a radius
equal to zero.
Gets the value of twice the radius.
Does this shape contain the given point ?
Does this shape collide with another ?
Gets a vector that tells how much this shape penetrates another.
Trait Implementations
impl<'de, P, E> Deserialize<'de> for Disk<P, E> where
P: Deserialize<'de>,
E: Deserialize<'de>,
impl<'de, P, E> Deserialize<'de> for Disk<P, E> where
P: Deserialize<'de>,
E: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl<P, E> RefUnwindSafe for Disk<P, E> where
E: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, E> UnwindSafe for Disk<P, E> where
E: UnwindSafe,
P: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more