Struct mold2d::raycast::Segment [] [src]

pub struct Segment {
    pub point: (f64, f64),
    pub vector: Vector2D,
}

Fields

The point that the segment starts out at

The magnitude and the direction of the segment

Methods

impl Segment
[src]

Checks intersection for two segments. If the two segments intersect it returns the intersection point, otherwise it returns None

Returns the normalized segment

Returns a segment with a magnitude shortened by a certain amount

Returns the length of the segment

Trait Implementations

impl Clone for Segment
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Segment
[src]

Formats the value using the given formatter.

impl PartialEq for Segment
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.