Struct siege_math::vector::Vec2 [] [src]

#[repr(C)]
pub struct Vec2<F> { pub x: F, pub y: F, }

A 2-element vector

Fields

Methods

impl<F: FullFloat> Vec2<F>
[src]

[src]

Construct a new vector

impl<F: FullFloat> Vec2<F>
[src]

[src]

impl<F: FullFloat> Vec2<F>
[src]

[src]

impl<F: FullFloat> Vec2<F>
[src]

[src]

impl<F: FullFloat> Vec2<F>
[src]

[src]

impl<F: FullFloat> Vec2<F>
[src]

[src]

impl<F: FullFloat> Vec2<F>
[src]

[src]

impl<F: FullFloat> Vec2<F>
[src]

[src]

impl<F: FullFloat> Vec2<F>
[src]

[src]

Trait Implementations

impl<F: FullFloat> From<Point2<F>> for Vec2<F>
[src]

[src]

Performs the conversion.

impl<F: FullFloat> From<Vec2<F>> for Point2<F>
[src]

[src]

Performs the conversion.

impl<F: FullFloat> Add<Vec2<F>> for Point2<F>
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<F: FullFloat> Sub<Vec2<F>> for Point2<F>
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<F: FullFloat> From<Direction2<F>> for Vec2<F>
[src]

[src]

Performs the conversion.

impl<F: FullFloat> From<Vec2<F>> for Direction2<F>
[src]

[src]

Performs the conversion.

impl<F: Debug> Debug for Vec2<F>
[src]

[src]

Formats the value using the given formatter. Read more

impl<F: Clone> Clone for Vec2<F>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<F: Copy> Copy for Vec2<F>
[src]

impl<F: PartialEq> PartialEq for Vec2<F>
[src]

[src]

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

[src]

This method tests for !=.

impl<F: Eq> Eq for Vec2<F>
[src]

impl<F: Hash> Hash for Vec2<F>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<F: FullFloat> Index<usize> for Vec2<F>
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl<F: FullFloat> IndexMut<usize> for Vec2<F>
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl<F: FullFloat> Default for Vec2<F>
[src]

[src]

Returns the "default value" for a type. Read more

impl<F: FullFloat> Mul<F> for Vec2<F>
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<F: FullFloat> Mul<Vec2<F>> for Vec2<F>
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<F: FullFloat> MulAssign<F> for Vec2<F>
[src]

[src]

Performs the *= operation.

impl<F: FullFloat> Div<F> for Vec2<F>
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<F: FullFloat> DivAssign<F> for Vec2<F>
[src]

[src]

Performs the /= operation.

impl<F: FullFloat> Neg for Vec2<F>
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

impl<F: FullFloat> Add for Vec2<F>
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<F: FullFloat> AddAssign<Vec2<F>> for Vec2<F>
[src]

[src]

Performs the += operation.

impl<F: FullFloat> Sub for Vec2<F>
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<F: FullFloat> SubAssign<Vec2<F>> for Vec2<F>
[src]

[src]

Performs the -= operation.

impl<F: FullFloat> From<Vec3<F>> for Vec2<F>
[src]

[src]

Performs the conversion.

impl From<Vec2<f64>> for Vec2<f32>
[src]

[src]

Performs the conversion.

impl From<Vec2<f32>> for Vec2<f64>
[src]

[src]

Performs the conversion.

impl<F: FullFloat> ApproxEq for Vec2<F>
[src]

[src]

This method tests for self and other values to be approximately equal using two methods: epsilon and ulps. If the values differ by less than the given epsilon, they will be considered equal. If the values differ by more than epsilon, but by less than the given ulps, they will also be considered equal. Otherwise they are unequal. Read more

[src]

This method tests for self and other values to be not approximately equal using two methods: epsilon and ulps. If the values differ by less than the given epsilon, they will be considered equal. If the values differ by more than epsilon, but by less than the given ulps, they will also be considered equal. Otherwise they are unequal. Read more

impl<'a, 'b, F: FullFloat> Mul<&'a Vec2<F>> for &'b Mat2<F>
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a, 'b, F: FullFloat> Mul<&'a Mat2<F>> for &'a Vec2<F>
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

Auto Trait Implementations

impl<F> Send for Vec2<F> where
    F: Send

impl<F> Sync for Vec2<F> where
    F: Sync