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

added Math.celi, round, max & min #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions javascript/numbers
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ NaN; // result of e.g. 0/0
// There are a lot more things you can do with Math
Math.PI; // = 3.141592653589793
Math.floor(1.618); // = 1
Math.random(); //this will generate a random number
Math.min(1, 5, 8887, -88); // = -88 will return since Math.min returns the lowest number out of a set
Math.max(56, 78, 63, 90, 10); // = 90 will return since Math.max does the basic opposite of Math.min
Math.celi(5.9); // = 6, celi rounds up
Math.round(4.2); // = 4, it rounds to the closet integer