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

NightPortion method returns 0 for angle based rule calculations #3

Open
nadsmoo opened this issue May 12, 2018 · 0 comments
Open

NightPortion method returns 0 for angle based rule calculations #3

nadsmoo opened this issue May 12, 2018 · 0 comments

Comments

@nadsmoo
Copy link

nadsmoo commented May 12, 2018

Asalamu alaikum wa rahmatullahi wa barakatu akhi,

The line :
if (this.HighLatitudeAdjustmentMethod == HighLatitudeAdjustmentMethods.AngleBased)
return 1 / 60 * angle;

Should be :
if (this.HighLatitudeAdjustmentMethod == HighLatitudeAdjustmentMethods.AngleBased)
return 1d / 60d * angle;

Without this, the fraction returns 0 ( as it does integer division and returns a whole number), by setting the values to doubles a fraction is returned and angle based calculations work correctly.

Jazakallahu khairan for your good work.

Nad

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

1 participant