* @function LevelRenderer.Tool.Color.prototype.adjust * @description 调整值区间 * @param {Array. } value - 数组。 * @param {Array. } region - 区间。 * @returns {number} 调整后的值
(value, region)
| 865 | * @returns {number} 调整后的值 |
| 866 | */ |
| 867 | adjust(value, region) { |
| 868 | // < to <= & > to >= |
| 869 | // modify by linzhifeng 2014-05-25 because -0 == 0 |
| 870 | if (value <= region[0]) { |
| 871 | value = region[0]; |
| 872 | } else if (value >= region[1]) { |
| 873 | value = region[1]; |
| 874 | } |
| 875 | return value; |
| 876 | } |
| 877 | |
| 878 | /** |
| 879 | * @function LevelRenderer.Tool.Color.prototype.isCalculableColor |
no outgoing calls
no test coverage detected