Merge branch 'render'
This commit is contained in:
@@ -33,6 +33,12 @@ macro_rules! make_vector {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Into<[T; $number]> for $name<T> {
|
||||
fn into(self) -> [T; $number] {
|
||||
self.data
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Copy + Clone> Into<($( $t ) ,* )> for $name<T> {
|
||||
fn into(self) -> ($( $t ) ,* ) {
|
||||
( $( self.data[$y] ), *)
|
||||
@@ -62,6 +68,11 @@ macro_rules! make_vector {
|
||||
pub fn $x(&self) -> T {
|
||||
self.data[$y]
|
||||
}
|
||||
|
||||
/// Get a mut ref to the coordinate of the vector.
|
||||
pub fn $x_mut(&mut self) -> &mut T {
|
||||
&mut self.data[$y]
|
||||
}
|
||||
)*
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user