Timeline for Roguelike Building Generator
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 5, 2018 at 11:38 | comment | added | Sumurai8 | I had no clue that function existed. It appears it is not supported by IE11 though, which is a shame. That would be the obvious choice to well... truncate... a value. | |
| Apr 5, 2018 at 10:30 | comment | added | Kruga | @Sumurai8 or just use the built-in Math.trunc() | |
| Apr 3, 2018 at 7:44 | comment | added | Sumurai8 | Strictly speaking, the ~~ operation on any variable should return that variable, since flipping all bits twice would return the bits in the normal state. Javascript apparently makes it an int first. If you want the "truncate" behaviour, you could also use parseInt. | |
| Apr 2, 2018 at 11:38 | comment | added | Ben Rivers | Concerning the footnotes: I've always thought of ~~ as truncation and not rounding. | |
| Apr 2, 2018 at 11:36 | comment | added | Ben Rivers | Upvote and accept, this is a great answer to an awful question. The reason for function foo(){} being disabled on KA is due to security, and I personally prefer to use it over var foo=function(){} in most cases. | |
| Apr 2, 2018 at 11:29 | vote | accept | Ben Rivers | ||
| Apr 1, 2018 at 18:00 | history | edited | Sumurai8 | CC BY-SA 3.0 | added 5 characters in body |
| Apr 1, 2018 at 17:48 | history | answered | Sumurai8 | CC BY-SA 3.0 |