mat3 from_rotation_yx + from_rotation_y
This commit is contained in:
parent
759648ebfb
commit
22087c53b3
@ -565,11 +565,24 @@ pub mod mat3{
|
||||
[Planar64::ZERO,Planar64::ZERO,diag.z],
|
||||
])
|
||||
}
|
||||
#[inline]
|
||||
pub fn from_rotation_yx(x:Angle32,y:Angle32)->Planar64Mat3{
|
||||
todo!()
|
||||
let (xc,xs)=x.cos_sin();
|
||||
let (yc,ys)=y.cos_sin();
|
||||
Planar64Mat3::from_rows([
|
||||
Planar64Vec3::new([xc,Planar64::ZERO,-xs]),
|
||||
Planar64Vec3::new([(xs*ys).fix_1(),yc,(xc*ys).fix_1()]),
|
||||
Planar64Vec3::new([(xs*yc).fix_1(),-ys,(xc*yc).fix_1()]),
|
||||
])
|
||||
}
|
||||
#[inline]
|
||||
pub fn from_rotation_y(y:Angle32)->Planar64Mat3{
|
||||
todo!()
|
||||
let (c,s)=y.cos_sin();
|
||||
Planar64Mat3::from_rows([
|
||||
Planar64Vec3::new([c,Planar64::ZERO,-s]),
|
||||
vec3::Y,
|
||||
Planar64Vec3::new([s,Planar64::ZERO,c]),
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user