From e79f88bb9b09cfb127cd53b28e0578f59fe3a63c Mon Sep 17 00:00:00 2001 From: trotFunky Date: Mon, 28 Oct 2019 21:33:25 +0100 Subject: [PATCH] Added missing return for Scalar multiplication. Added Vec3d typedef (Useful later) Removed debug printing --- src/KeyStateManager.cpp | 2 -- src/Vectors.h | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/KeyStateManager.cpp b/src/KeyStateManager.cpp index 9bf68e9..40e90ca 100644 --- a/src/KeyStateManager.cpp +++ b/src/KeyStateManager.cpp @@ -112,8 +112,6 @@ void KeyStateManager::mouse_movement(int mouse_x, int mouse_y) current_mouse_delta.y += frame_delta.y; last_mouse_position = current_frame; - - std::cout << frame_delta.x << "," << frame_delta.y << std::endl; } void KeyStateManager::mouse_click(int mouse_button, int button_state, int mouse_x, int mouse_y) diff --git a/src/Vectors.h b/src/Vectors.h index 29bdf82..07eafec 100644 --- a/src/Vectors.h +++ b/src/Vectors.h @@ -67,6 +67,7 @@ struct CoordinatesVector { result.coordinates[i] = coordinates[i] * scalar; } + return result; } CoordinatesVector operator+(const CoordinatesVector& op) @@ -86,7 +87,6 @@ struct CoordinatesVector { result.coordinates[i] = coordinates[i] - op.coordinates[i]; } - return result; } @@ -209,6 +209,6 @@ typedef Vec2 Vec2f; typedef Vec3 Vec3i; typedef Vec3 Vec3f; - +typedef Vec3 Vec3d; #endif //TESTS_OPENGL_VECTORS_H