Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update math.md, simplifying secondsToRadiant return operation#826

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
tuco5 wants to merge1 commit intoquii:main
base:main
Choose a base branch
Loading
fromtuco5:patch-1

Conversation

@tuco5
Copy link

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

By simplifying the radiant division in thesecondsToRadiant 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.
@tuco5tuco5 changed the titleUpdate math.md, simple return type, avoid handling zero casesUpdate math.md, simplifying secondsToRadiant return operationDec 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@tuco5

[8]ページ先頭

©2009-2025 Movatter.jp