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

private access for calculation functions #14

Open
EverydayRoadster opened this issue Jan 25, 2025 · 1 comment
Open

private access for calculation functions #14

EverydayRoadster opened this issue Jan 25, 2025 · 1 comment

Comments

@EverydayRoadster
Copy link

Very useful library, thanks for the port.
If there is a chance, I would appreciate more of the calculation functions to become public.

E.g. in my use case, sun position calculation is part of more angles math tasks.
Right now I have to duplicate code for some of the calculations, because

  • access to suncalc is high level only (e.g. GetPosition) and not on finer level to allow for use of pre-calculated values (azimuth(), altitude())
  • access to generic helper functions is private (e.g. calc of lw, phi, function toDays() etc)
@sixdouglas
Copy link
Owner

Hi @EverydayRoadster
The easy way would be Upper case all first letter method names, but not sure that would be clean.
Which functions would you like to be able to reach?
Could these methods be part of another Struct called from suncalc and your code? Would it make sens? Would it be clean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants