aswi2020vldc-gitlab/templetes/node_modules/es-abstract/2019/ToInt16.js @ 56f6c6df
1 |
'use strict'; |
---|---|
2 |
|
3 |
var ToUint16 = require('./ToUint16'); |
4 |
|
5 |
// https://www.ecma-international.org/ecma-262/6.0/#sec-toint16
|
6 |
|
7 |
module.exports = function ToInt16(argument) { |
8 |
var int16bit = ToUint16(argument); |
9 |
return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; |
10 |
};
|