Skip to content

Conversation

@tuco5
Copy link

@tuco5 tuco5 commented Dec 2, 2024

I want to propose this change to simplify the lecture of the math chapter.

By simplifying the radiant division in the secondsToRadiant and use the parameter as numerator instead of denominator we avoid handling a 0 case type.

Benefits:

  • We can short the chapter removing the zero division error explanation.
  • By dividing the func parameter Is easier to read and we avoid the imprecise floating points
  • If func param is 0 then the return value will be 0 instead of an error.

I hope this helps to simplify the code and the lecture.
Thanks for this great course

Simplify the radiant division in the secondsToRadiant function and use the parameter as numerator to avoid handling a 0 case type.
@tuco5 tuco5 changed the title Update math.md, simple return type, avoid handling zero cases Update math.md, simplifying secondsToRadiant return operation Dec 2, 2024
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

Successfully merging this pull request may close these issues.

1 participant