Created
November 9, 2016 20:58
-
-
Save tobie/cf495a00600d904769c30fce05c0069f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div algorithm> | |
To compute the <dfn lt="IntegerPart">integer part</dfn> of an ECMAScript number |n|, | |
the following steps must be taken: | |
1. Let |r| be [=floor=]([=abs=](|n|)) | |
1. If |n| < 0, | |
then return -1 * |r|. | |
1. Otherwise return |r|. | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment