1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use crate::{matrix, vector3};
pub trait Rotate {
fn rotate(&self, rotation_matrix: matrix::Matrix) -> Self;
}
pub trait InnerProduct {
fn inner_product(&self, _rhs: &Self) -> f32;
}
pub trait OuterProduct {
fn outer_product(&self, _rhs: &Self) -> vector3::Vector3;
}
pub trait Scale {
fn scale(&self, multiplier: f32) -> Self;
}
pub trait Negate {
fn negate(&self) -> Self;
}
pub trait Length {
fn get_squared_length(&self) -> f32;
fn get_length(&self) -> f32;
fn normalize(&self) -> Self;
}