Skip to content

Conversation

@xezon
Copy link

@xezon xezon commented Jan 31, 2026

This change just applies a few misc code type and comment fixes as seen when working on camera related code.

Funtionality wise nothing changes.

@xezon xezon added Minor Severity: Minor < Major < Critical < Blocker Fix Is fixing something, but is not user facing labels Jan 31, 2026
@greptile-apps
Copy link

greptile-apps bot commented Jan 31, 2026

Greptile Overview

Greptile Summary

This PR applies miscellaneous type and comment improvements to camera-related code across 10 files with no functional changes.

Key changes:

  • Replaced Matrix3D(1) with Matrix3D(true) across all files to use explicit bool parameter instead of implicit int-to-bool conversion, improving code clarity
  • Fixed float literal precision in camera.cpp files by changing tan(x/2.0) to tan(x/2.0f) to avoid unnecessary double precision calculations
  • Corrected documentation typo in Un_Project comment: changed "ViewPlaneMin.X" to "ViewPlaneMin.Y" for the Y-axis mapping
  • Added detailed inline comments in frustum.h documenting the Planes and Corners array indices
  • Removed extraneous blank line in Set_View_Plane function

All changes are cosmetic refactorings that improve code quality, readability, and type safety without altering runtime behavior.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • All changes are cosmetic refactorings that improve code clarity without affecting functionality - explicit type conversions, corrected documentation, and added helpful comments
  • No files require special attention

Important Files Changed

Filename Overview
Core/Libraries/Source/WWVegas/WWMath/frustum.h Added detailed comments documenting Planes and Corners array indices for better code clarity
Generals/Code/Libraries/Source/WWVegas/WW3D2/camera.cpp Changed Matrix3D(1) to Matrix3D(true), fixed float literals (2.0 to 2.0f), corrected comment typo, and removed blank line
GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/camera.cpp Changed Matrix3D(1) to Matrix3D(true), fixed float literals (2.0 to 2.0f), corrected comment typo, and removed blank line

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Code as Codebase
    participant Matrix as Matrix3D Constructor
    participant Compiler as C++ Compiler

    Dev->>Code: Identify Matrix3D(1) calls
    Note over Code: Multiple files use implicit<br/>int-to-bool conversion
    
    Dev->>Code: Change Matrix3D(1) to Matrix3D(true)
    Note over Matrix: Explicit bool parameter<br/>makes intent clear
    
    Dev->>Code: Fix float literals (2.0 → 2.0f)
    Note over Compiler: Avoids unnecessary<br/>double precision
    
    Dev->>Code: Fix comment typo
    Note over Code: ViewPlaneMin.X → ViewPlaneMin.Y<br/>in Un_Project documentation
    
    Dev->>Code: Add Planes/Corners documentation
    Note over Code: frustum.h arrays now<br/>clearly documented
    
    Code->>Compiler: Compile with changes
    Compiler->>Dev: No behavior change,<br/>improved clarity
Loading

Copy link

@Mauller Mauller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can tell C developers worked on parts of this code base.

@xezon xezon merged commit ac36b17 into TheSuperHackers:main Jan 31, 2026
24 checks passed
@xezon xezon deleted the xezon/refactor-misc-vegas-code branch January 31, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix Is fixing something, but is not user facing Minor Severity: Minor < Major < Critical < Blocker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants