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

Refactor Maths.cs #31

Open
Dat-Pudding opened this issue Jun 18, 2024 · 0 comments
Open

Refactor Maths.cs #31

Dat-Pudding opened this issue Jun 18, 2024 · 0 comments
Labels
Android for Android related issues enhancement New feature or request good first issue Good for newcomers

Comments

@Dat-Pudding
Copy link
Owner

Dat-Pudding commented Jun 18, 2024

Description

Currently it's a semi-mess with each calculation function being a singular thing within the Maths class that inherits from ScriptableObject in Maths.cs.

Requirements

For the actual work

  • forked and cloned PhotoCalc repository
  • C#-capable code editor

For building and testing

  • Current Unity LTS version

Tasks

You can only do the main tasks and keep the optional ones open for others or you can do them all.

Main Tasks

  • Refactor the CalcXYZ() functions into the according two groups e.g. as component functions of float[] CalcExposureTime() and float[] CalcFoV()
  • integrate either a "state machine" or overloaded functions to deal with incomplete arguments (e.g.: when no pixel pitch is being entered it'd nonsensical to still try and call CalcNPF())

Optional Tasks

  • fix the according function calls in ExpoManager.cs and FovManager.cs
  • fix the according data handling due to e.g. the exemplary change from a bunch of functions with different and identical return types to a parent function of return type float[]
    • either by building an iterator
    • or by hard-coded indices

Afterwards

When done, commit the changes to the Android branch and open a pull request according to the guidelines in the Contribution guidelines

@Dat-Pudding Dat-Pudding added Android for Android related issues enhancement New feature or request good first issue Good for newcomers labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android for Android related issues enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant