parent
b86166cfd4
commit
1f9430399e
1 changed files with 3 additions and 2 deletions
|
@ -13,7 +13,6 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use std::mem::transmute;
|
||||
use std::fmt;
|
||||
use std::num::Zero;
|
||||
|
||||
|
@ -67,7 +66,9 @@ impl<S: BaseFloat> Plane<S> {
|
|||
|
||||
/// Construct a plane from the components of a four-dimensional vector
|
||||
pub fn from_vector4(v: Vector4<S>) -> Plane<S> {
|
||||
unsafe { transmute(v) }
|
||||
match v {
|
||||
Vector4 { x, y, z, w } => Plane { n: Vector3::new(x, y, z), d: w },
|
||||
}
|
||||
}
|
||||
|
||||
/// Constructs a plane that passes through the the three points `a`, `b` and `c`
|
||||
|
|
Loading…
Reference in a new issue