Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move util functions out of cgaz.js #107

Merged
merged 8 commits into from
Jan 17, 2024
Merged

Move util functions out of cgaz.js #107

merged 8 commits into from
Jan 17, 2024

Conversation

PeenScreeker
Copy link
Member

@PeenScreeker PeenScreeker commented Nov 28, 2023

This pull request moves math functions out of the cgaz.js file to separate util files math.js and colors.js. The intent is to move these out for:

  • reducing mental load reading cgaz.js
  • prep to make cgaz modular components (like all other hud tools)
  • potential reuse by other contributors (color functions, and mapping angles to the screen)

Upon merging this PR, cgaz.js should be broken up into separate tools. It seemed appropriate to break this into two separate pull requests to keep the refactor organized.

Checks

  • I have thoroughly tested all of the code I have modified/added/removed to ensure something else did not break
  • I have followed semantic commit messages e.g. feat: Add foo, chore: Update bar, etc...
  • My branch has a clear history of changes that can be easy to follow when being reviewed commit-by-commit
  • My branch is functionally complete; the only changes to be done will be those potentially requested in code review
  • All changes requested in review have been fixuped into my original commits.
  • Fully tokenized all my strings (no hardcoded English strings!!) and supplied bulk JSON strings below

@PeenScreeker PeenScreeker self-assigned this Nov 28, 2023
@PeenScreeker PeenScreeker added Size: Small Something that may take a day at most to do. Type: Development / Internal Something that is more internal to development than end-user. labels Nov 28, 2023
Copy link
Member

@tsa96 tsa96 left a comment

Choose a reason for hiding this comment

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

Since these are global utilities now, we should absolutely get them over to TypeScript. I've done colors.ts for you, math.ts should be very easy.

scripts/util/colors.js Outdated Show resolved Hide resolved
scripts/util/colors.js Outdated Show resolved Hide resolved
scripts/util/colors.js Outdated Show resolved Hide resolved
scripts/util/colors.js Outdated Show resolved Hide resolved
scripts/util/math.js Outdated Show resolved Hide resolved
scripts/util/math.js Outdated Show resolved Hide resolved
@PeenScreeker PeenScreeker force-pushed the feat/cgaz-math-utils branch 4 times, most recently from 4829df5 to 16bcaa1 Compare December 2, 2023 03:46
scripts/util/colors.ts Outdated Show resolved Hide resolved
scripts/util/colors.ts Show resolved Hide resolved
scripts/util/math.ts Outdated Show resolved Hide resolved
scripts/util/colors.ts Show resolved Hide resolved
@tsa96
Copy link
Member

tsa96 commented Jan 17, 2024

Sorry didn't realise I hadn't resolved everything

@tsa96 tsa96 merged commit 022293f into master Jan 17, 2024
1 check passed
@tsa96 tsa96 deleted the feat/cgaz-math-utils branch January 17, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: Small Something that may take a day at most to do. Type: Development / Internal Something that is more internal to development than end-user.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants