From ab2ad15d25410e2bfbc9ef94ef47f389bf84da3f Mon Sep 17 00:00:00 2001 From: thenightterorx <112033887+thenightterorx@users.noreply.github.com> Date: Mon, 6 Jan 2025 18:54:57 -0600 Subject: [PATCH] allow negative eye distance (for cross view) --- src/graphics.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graphics.hpp b/src/graphics.hpp index b9dbf16..8595020 100644 --- a/src/graphics.hpp +++ b/src/graphics.hpp @@ -315,7 +315,7 @@ class Camera { dis = 0.5f*(float)width/tan(fov*pif/360.0f); } void input_N() { - eye_distance = fmax(eye_distance-0.2f, 0.0f); + eye_distance = eye_distance-0.2f; } void input_M() { eye_distance += 0.2f; @@ -362,4 +362,4 @@ void draw_triangle(const float3& p0, const float3& p1, const float3& p2, const i void draw_triangle(const float3& p0, const float3& p1, const float3& p2, const int c0, const int c1, const int c2, const bool translucent=false); void draw_text(const float3& p, const float r, const string& s, const int color); -#endif // GRAPHICS \ No newline at end of file +#endif // GRAPHICS