Struct affine_transforms::vectors::Vector [−][src]
pub struct Vector { /* fields omitted */ }
Methods
impl Vector
[src]
impl Vector
pub fn magnitude_squared(&self) -> f64
[src]
pub fn magnitude_squared(&self) -> f64
pub fn magnitude(&self) -> f64
[src]
pub fn magnitude(&self) -> f64
pub fn new(x: f64, y: f64, z: f64) -> Vector
[src]
pub fn new(x: f64, y: f64, z: f64) -> Vector
pub fn newi(x: i32, y: i32, z: i32) -> Vector
[src]
pub fn newi(x: i32, y: i32, z: i32) -> Vector
pub fn dot(&self, v: Vector) -> f64
[src]
pub fn dot(&self, v: Vector) -> f64
pub fn cross(&self, v: Vector) -> Vector
[src]
pub fn cross(&self, v: Vector) -> Vector
pub fn unit(&self) -> Vector
[src]
pub fn unit(&self) -> Vector
pub fn v_add(&self, v: Vector) -> Vector
[src]
pub fn v_add(&self, v: Vector) -> Vector
pub fn v_usub(&self) -> Vector
[src]
pub fn v_usub(&self) -> Vector
pub fn v_sub(&self, v: Vector) -> Vector
[src]
pub fn v_sub(&self, v: Vector) -> Vector
pub fn scale(&self, s: f64) -> Vector
[src]
pub fn scale(&self, s: f64) -> Vector
pub fn round(&self) -> Vector
[src]
pub fn round(&self) -> Vector
pub fn x(&self) -> f64
[src]
pub fn x(&self) -> f64
pub fn y(&self) -> f64
[src]
pub fn y(&self) -> f64
pub fn z(&self) -> f64
[src]
pub fn z(&self) -> f64
pub fn zero() -> Vector
[src]
pub fn zero() -> Vector
pub fn identity() -> Vector
[src]
pub fn identity() -> Vector
pub fn i_hat() -> Vector
[src]
pub fn i_hat() -> Vector
pub fn j_hat() -> Vector
[src]
pub fn j_hat() -> Vector
pub fn k_hat() -> Vector
[src]
pub fn k_hat() -> Vector
pub fn with_x(&self, x: f64) -> Vector
[src]
pub fn with_x(&self, x: f64) -> Vector
pub fn with_y(&self, y: f64) -> Vector
[src]
pub fn with_y(&self, y: f64) -> Vector
pub fn with_z(&self, z: f64) -> Vector
[src]
pub fn with_z(&self, z: f64) -> Vector
Trait Implementations
impl Debug for Vector
[src]
impl Debug for Vector
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Vector
[src]
impl PartialEq for Vector
fn eq(&self, other: &Vector) -> bool
[src]
fn eq(&self, other: &Vector) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Vector) -> bool
[src]
fn ne(&self, other: &Vector) -> bool
This method tests for !=
.
impl Clone for Vector
[src]
impl Clone for Vector
fn clone(&self) -> Vector
[src]
fn clone(&self) -> Vector
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Vector
[src]
impl Copy for Vector
impl Add for Vector
[src]
impl Add for Vector
type Output = Vector
The resulting type after applying the +
operator.
fn add(self, v: Vector) -> Vector
[src]
fn add(self, v: Vector) -> Vector
Performs the +
operation.
impl Sub for Vector
[src]
impl Sub for Vector
type Output = Vector
The resulting type after applying the -
operator.
fn sub(self, v: Vector) -> Vector
[src]
fn sub(self, v: Vector) -> Vector
Performs the -
operation.
impl Mul<f64> for Vector
[src]
impl Mul<f64> for Vector
type Output = Vector
The resulting type after applying the *
operator.
fn mul(self, s: f64) -> Vector
[src]
fn mul(self, s: f64) -> Vector
Performs the *
operation.
impl Mul<Vector> for f64
[src]
impl Mul<Vector> for f64
type Output = Vector
The resulting type after applying the *
operator.
fn mul(self, v: Vector) -> Vector
[src]
fn mul(self, v: Vector) -> Vector
Performs the *
operation.
impl Neg for Vector
[src]
impl Neg for Vector
type Output = Vector
The resulting type after applying the -
operator.
fn neg(self) -> Vector
[src]
fn neg(self) -> Vector
Performs the unary -
operation.
impl Mul<Vector> for AffineMatrix
[src]
impl Mul<Vector> for AffineMatrix