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

Bug 1462897 - Directly use Math.round in the demo code. #956

Merged
merged 1 commit into from May 31, 2018

Conversation

Projects
None yet
2 participants
@arai-a
Contributor

arai-a commented May 31, 2018

https://bugzilla.mozilla.org/show_bug.cgi?id=1462897

The demo for Math.round currently implements custom function which performs round in the specified precision, but it's not good function.

Then, the MDN page [1] was describing the issue of the demo, and solution for the function in the demo, instead of the Math.round function itself.
it was completely unrelated to the API and IMO those things shouldn't be on the document,
but the document should describe the API itself.

Changed the demo to directly use the Math.round.
also I've removed the unrelated sections from the MDN [2].

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round
[2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round$compare?locale=en-US&to=1385078&from=1383484

@wbamberg

Looks good to me, thanks @arai-a !

@wbamberg wbamberg merged commit a8d484b into mdn:master May 31, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
security/snyk - package.json No dependency changes
Details

wbamberg added a commit to wbamberg/interactive-examples that referenced this pull request Jun 8, 2018

Merge remote-tracking branch 'upstream/master'
* upstream/master:
  adding oblique plus angle option to font-style example (mdn#963)
  fix(tabbed-editor): Apply output class to output container (mdn#961)
  Add rt example. (mdn#957)
  chore(deps): update dependency prettier to v1.13.4 (mdn#953)
  chore(deps): update dependency all-contributors-cli to v4.11.2 (mdn#954)
  chore(deps): update dependency jest to v23.1.0 (mdn#955)
  Fix console util to support negative zero (mdn#960)
  Add rp example. (mdn#945)
  Bug 1462897 - Directly use Math.round in the demo code. (mdn#956)
  chore(docs): update README with maintainers and good first issues (mdn#934)
  Implemented example for <figcaption> tag (mdn#941)
  Font variation settings (mdn#948)
  Fix font optical sizing (mdn#947)
  chore(deps): update dependency jest to v23 (mdn#944)
  chore(deps): update dependency prettier to v1.13.0 (mdn#950)
  chore(community): add @elharony as contributor (mdn#951)
  Add object-keys.html (mdn#937)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment