js-hexfloat
Advanced tools
Comparing version 0.4.5 to 0.4.6
@@ -29,11 +29,15 @@ /* | ||
var toHexString = function() { | ||
if (this == 0.0) { | ||
return (1/0 !== 1/this ? '-' : '') + '0x0p+0'; | ||
} else if (isNaN(this)) { | ||
if (isNaN(this)) { | ||
return 'nan'; | ||
}else if (!isFinite(this)) { | ||
return (this < 0 ? '-' : '') + 'inf'; | ||
} | ||
var sign = this < 0 ? '-' : ''; | ||
var a = Math.abs(this); | ||
} | ||
var that = +this; | ||
if (Object.is(that, +0.0)) { | ||
return '0x0p+0'; | ||
} else if (Object.is(that, -0.0)) { | ||
return '-0x0p+0'; | ||
} else if (!isFinite(that)) { | ||
return (that < 0 ? '-' : '') + 'inf'; | ||
} | ||
var sign = that < 0 ? '-' : ''; | ||
var a = Math.abs(that); | ||
var p = 0; | ||
@@ -40,0 +44,0 @@ if (a < 1) { |
{ | ||
"name": "js-hexfloat", | ||
"version": "0.4.5", | ||
"version": "0.4.6", | ||
"description": "Rudimentary C99 Hexadecimal Floating Point Support in JS", | ||
@@ -5,0 +5,0 @@ "main": "hexfloat.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12779
161