Sha256: f955cd0195896bd0e5a2bc39e11a1c847e321dc63948485dec91cc8dd5ab7347
Contents?: true
Size: 471 Bytes
Versions: 69
Compression:
Stored size: 471 Bytes
Contents
define(function(){ /** * "Convert" value into an 32-bit integer. * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. * IMPORTANT: val will wrap at 2^31 and -2^31. * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 */ function toInt(val){ // we do not use lang/toNumber because of perf and also because it // doesn't break the functionality return ~~val; } return toInt; });
Version data entries
69 entries across 69 versions & 2 rubygems