Skip to content

Instantly share code, notes, and snippets.

@davidcostadev
Created March 1, 2019 15:47
Show Gist options
  • Save davidcostadev/eca9d9997457e5ab0cfc80c8e3d13279 to your computer and use it in GitHub Desktop.
Save davidcostadev/eca9d9997457e5ab0cfc80c8e3d13279 to your computer and use it in GitHub Desktop.

Revisions

  1. davidcostadev created this gist Mar 1, 2019.
    3 changes: 3 additions & 0 deletions math.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    const mdc = (a, b) => b === 0 ? a : mdc(b, a % b)

    const mmc = (a, b) => a * b / mdc(a, b)