added fixes for problems detected by sonarqube
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Gitea Actions Demo / Scan the project (push) Successful in 24s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Gitea Actions Demo / Scan the project (push) Successful in 24s
				
			This commit is contained in:
		@ -43,6 +43,7 @@ public static class Input
 | 
			
		||||
	{
 | 
			
		||||
		List<Key> searchKeys = keys.ToList();
 | 
			
		||||
		int count = 0;
 | 
			
		||||
 | 
			
		||||
		foreach (var key in searchKeys)
 | 
			
		||||
		{
 | 
			
		||||
			if (IsKeyPressed(key))
 | 
			
		||||
 | 
			
		||||
@ -21,7 +21,6 @@ public class Camera
 | 
			
		||||
	private Vector3D<float> _up;
 | 
			
		||||
	private float _yaw;
 | 
			
		||||
	private float _pitch;
 | 
			
		||||
	private float _movementSpeed;
 | 
			
		||||
 | 
			
		||||
	/// <summary>
 | 
			
		||||
	/// The view matrix according to the current camera position and rotation
 | 
			
		||||
@ -39,7 +38,7 @@ public class Camera
 | 
			
		||||
		_position = position;
 | 
			
		||||
		_yaw = yaw;
 | 
			
		||||
		_pitch = pitch;
 | 
			
		||||
		_movementSpeed = movementSpeed;
 | 
			
		||||
		MovementSpeed = movementSpeed;
 | 
			
		||||
		Fov = fov;
 | 
			
		||||
		_worldUp = Vector3D<float>.UnitY;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -16,7 +16,7 @@ using System.Numerics;
 | 
			
		||||
// Next to do will be cleaning this up by creating a shader class and maybe even an engine class
 | 
			
		||||
// IEngine -> IEngine.Create(WindowOptions) -> return OpenGLEngine/VulkanEngine maybe?
 | 
			
		||||
 | 
			
		||||
public class Program
 | 
			
		||||
public static class Program
 | 
			
		||||
{
 | 
			
		||||
	private const int Width = 800;
 | 
			
		||||
	private const int Height = 600;
 | 
			
		||||
@ -192,7 +192,7 @@ public class Program
 | 
			
		||||
		var difference = (float)(_window.Time * 10);
 | 
			
		||||
		var modelMatrix = Matrix4x4.CreateRotationY(Maths.Convert.ToRadians(difference)) * Matrix4x4.CreateRotationX(Maths.Convert.ToRadians(difference));
 | 
			
		||||
		var viewMatrix = _cam.ViewMatrix;
 | 
			
		||||
		var projectionMatrix = Matrix4X4.CreatePerspectiveFieldOfView(Maths.Convert.ToRadians(_cam.Fov), Width / Height, 0.1f, 100.0f);
 | 
			
		||||
		var projectionMatrix = Matrix4X4.CreatePerspectiveFieldOfView(Maths.Convert.ToRadians(_cam.Fov), Width / (float)Height, 0.1f, 100.0f);
 | 
			
		||||
 | 
			
		||||
		_gl.BindVertexArray(_vao);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user