DuyTa's picture
Upload folder using huggingface_hub
bc20498 verified
raw
history blame
446 Bytes
function IMath() {
}
/**
* This method returns the sign of the input value.
*/
IMath.sign = function (value) {
if (value > 0)
{
return 1;
}
else if (value < 0)
{
return -1;
}
else
{
return 0;
}
};
IMath.floor = function (value) {
return value < 0 ? Math.ceil(value) : Math.floor(value);
};
IMath.ceil = function (value) {
return value < 0 ? Math.floor(value) : Math.ceil(value);
};
module.exports = IMath;