Struct Ray2
pub struct Ray2 { /* private fields */ }Expand description
A half-infinite 2D ray.
Implementations§
§impl Ray2
impl Ray2
pub fn try_new(
origin: Point2,
direction: Vector<2>,
) -> Result<Ray2, GeometryError>
pub fn try_new( origin: Point2, direction: Vector<2>, ) -> Result<Ray2, GeometryError>
Creates a ray with a finite origin and finite non-zero direction.
§Errors
Returns a GeometryError when the origin is non-finite or the direction is invalid.
pub const fn direction(self) -> Vector<2>
pub const fn direction(self) -> Vector<2>
Returns the ray direction.
Trait Implementations§
impl Copy for Ray2
impl StructuralPartialEq for Ray2
Auto Trait Implementations§
impl Freeze for Ray2
impl RefUnwindSafe for Ray2
impl Send for Ray2
impl Sync for Ray2
impl Unpin for Ray2
impl UnsafeUnpin for Ray2
impl UnwindSafe for Ray2
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more