Type Alias Vec2i

Source
pub type Vec2i = Vec2<i64>;
Expand description

Type for representing a 2D vector with i64 as fields.

Aliased Type§

struct Vec2i {
    pub x: i64,
    pub y: i64,
}

Fields§

§x: i64§y: i64

Trait Implementations§

Source§

impl VectorOperations<i64> for Vec2i

Source§

fn length(&self) -> f64

Get the length of this vector.
Source§

fn normalize(&self) -> Vec2<f64>

Normalize this vector (i.e., set its length to 1 but preserve the direction).
Source§

fn dot(&self, rhs: &Self) -> i64

Calculate the dot product of this vectort and another one.