mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 02:04:35 +00:00
Fix tengant typo
This commit is contained in:
parent
6ad79aae3e
commit
c5f9b31688
@ -114,19 +114,19 @@ namespace glm
|
|||||||
return false;
|
return false;
|
||||||
typename genType::value_type inv_det = typename genType::value_type(1) / det;
|
typename genType::value_type inv_det = typename genType::value_type(1) / det;
|
||||||
|
|
||||||
genType Tengant = orig - vert0;
|
genType Tangent = orig - vert0;
|
||||||
|
|
||||||
position.y = dot(Tengant, Perpendicular) * inv_det;
|
position.y = dot(Tangent, Perpendicular) * inv_det;
|
||||||
if (position.y < typename genType::value_type(0) || position.y > typename genType::value_type(1))
|
if (position.y < typename genType::value_type(0) || position.y > typename genType::value_type(1))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
genType Cotengant = cross(Tengant, edge1);
|
genType Cotangent = cross(Tangent, edge1);
|
||||||
|
|
||||||
position.z = dot(dir, Cotengant) * inv_det;
|
position.z = dot(dir, Cotangent) * inv_det;
|
||||||
if (position.z < typename genType::value_type(0) || position.y + position.z > typename genType::value_type(1))
|
if (position.z < typename genType::value_type(0) || position.y + position.z > typename genType::value_type(1))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
position.x = dot(edge2, Cotengant) * inv_det;
|
position.x = dot(edge2, Cotangent) * inv_det;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user