Remove unused `LineSegment2F::cross` and vector cross product functions
This commit is contained in:
parent
1a42bbf4d3
commit
dc45dc459e
|
@ -220,17 +220,6 @@ impl LineSegment2F {
|
||||||
dx * dx + dy * dy
|
dx * dx + dy * dy
|
||||||
}
|
}
|
||||||
|
|
||||||
// Given a line equation of the form `ax + by + c = 0`, returns a vector of the form
|
|
||||||
// `[a, b, c, 0]`.
|
|
||||||
//
|
|
||||||
// TODO(pcwalton): Optimize.
|
|
||||||
#[inline]
|
|
||||||
pub fn line_coords(&self) -> F32x4 {
|
|
||||||
let from = F32x4::new(self.0[0], self.0[1], 1.0, 0.0);
|
|
||||||
let to = F32x4::new(self.0[2], self.0[3], 1.0, 0.0);
|
|
||||||
from.cross(to)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn vector(&self) -> Vector2F {
|
pub fn vector(&self) -> Vector2F {
|
||||||
self.to() - self.from()
|
self.to() - self.from()
|
||||||
|
|
|
@ -130,11 +130,6 @@ impl F32x4 {
|
||||||
pub fn concat_wz_yx(self, other: F32x4) -> F32x4 {
|
pub fn concat_wz_yx(self, other: F32x4) -> F32x4 {
|
||||||
unsafe { F32x4(simd_shuffle4(self.0, other.0, [3, 2, 5, 4])) }
|
unsafe { F32x4(simd_shuffle4(self.0, other.0, [3, 2, 5, 4])) }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
|
||||||
pub fn cross(&self, other: F32x4) -> F32x4 {
|
|
||||||
unimplemented!()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for F32x4 {
|
impl Default for F32x4 {
|
||||||
|
|
|
@ -162,12 +162,6 @@ impl F32x4 {
|
||||||
pub fn concat_wz_yx(self, other: F32x4) -> F32x4 {
|
pub fn concat_wz_yx(self, other: F32x4) -> F32x4 {
|
||||||
unsafe { F32x4(x86_64::_mm_shuffle_ps(self.0, other.0, 0b0001_1011)) }
|
unsafe { F32x4(x86_64::_mm_shuffle_ps(self.0, other.0, 0b0001_1011)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME(pcwalton): Move to `Vector4F`!
|
|
||||||
#[inline]
|
|
||||||
pub fn cross(&self, other: F32x4) -> F32x4 {
|
|
||||||
self.yzxw() * other.zxyw() - self.zxyw() * other.yzxw()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for F32x4 {
|
impl Default for F32x4 {
|
||||||
|
|
Loading…
Reference in New Issue