From 1a86ed23cce82026a8e16119c6474d7f87989ecd Mon Sep 17 00:00:00 2001 From: Dander7BD Date: Mon, 10 Feb 2014 15:19:06 +0100 Subject: [PATCH] Float3 SnapAngular compile error fix --- Code/OysterMath/LinearMath.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/OysterMath/LinearMath.h b/Code/OysterMath/LinearMath.h index 107ed470..2f01dbca 100644 --- a/Code/OysterMath/LinearMath.h +++ b/Code/OysterMath/LinearMath.h @@ -831,8 +831,8 @@ namespace LinearAlgebra3D template ::LinearAlgebra::Vector3 & SnapAngularAxis( const ::LinearAlgebra::Vector3 &startAngularAxis, const ::LinearAlgebra::Vector3 &localStartNormal, const ::LinearAlgebra::Vector3 &worldEndNormal, ::LinearAlgebra::Vector3 &targetMem = ::LinearAlgebra::Vector3() ) { - ::LinearAlgebra::Vector4 worldStartNormal( WorldAxisOf(Rotation(startAngularAxis), localStartNormal), (ScalarType)0 ); - targetMem = ::LinearAlgebra::Vector4( worldStartNormal.xyz.Cross(worldEndNormal), (ScalarType)0); + ::LinearAlgebra::Vector3 worldStartNormal( WorldAxisOf(Rotation(startAngularAxis), localStartNormal) ); + targetMem = worldStartNormal.Cross( worldEndNormal ); targetMem *= (ScalarType)::std::acos( ::Utility::Value::Clamp(worldStartNormal.Dot(worldEndNormal), (ScalarType)0, (ScalarType)1) ); return targetMem += startAngularAxis; }