Skip to content

Instantly share code, notes, and snippets.

@tobie

tobie/algo.txt

Created Nov 9, 2016
Embed
What would you like to do?
<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| &lt; 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