Minor code and comment polishing

This commit is contained in:
fsantini
2013-12-11 21:27:43 +01:00
parent cc2925b705
commit 5bde7fcb28
2 changed files with 4 additions and 10 deletions

View File

@ -129,7 +129,7 @@ void matrix_3x3::set_to_identity()
matrix_3x3 matrix_3x3::create_look_at(vector_3 target)
{
vector_3 z_row = vector_3(target.x, target.y, target.z).get_normal();
vector_3 z_row = target.get_normal();
vector_3 x_row = vector_3(1, 0, -target.x/target.z).get_normal();
vector_3 y_row = vector_3(0, 1, -target.y/target.z).get_normal();
@ -139,9 +139,7 @@ matrix_3x3 matrix_3x3::create_look_at(vector_3 target)
// create the matrix already correctly transposed
matrix_3x3 rot = matrix_3x3::create_from_rows(vector_3(x_row.x, x_row.y, x_row.z),
vector_3(y_row.x, y_row.y, y_row.z),
vector_3(z_row.x, z_row.y, z_row.z));
matrix_3x3 rot = matrix_3x3::create_from_rows(x_row, y_row, z_row);
// rot.debug("rot");
return rot;