@lijuhong1981/jsmath 1.3.3 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lijuhong1981/jsmath",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "> TODO: description",
5
5
  "author": "lijuhong1981 <lijuhong@hotmail.com>",
6
6
  "homepage": "https://github.com/lijuhong1981/jslibs#readme",
@@ -3,14 +3,14 @@
3
3
  * @param {Object} ndc 需转换的ndc坐标, {x: 0.5, y: -0.5, z: 0.0}
4
4
  * @param {Number} width 窗口像素宽
5
5
  * @param {Number} height 窗口像素高
6
- * @param {Object} result 输出结果对象
7
6
  * @param {Boolean} checkInvisible 是否检查不可见,默认true
7
+ * @param {Object} result 输出结果对象
8
8
  * @returns {Object|undefined} 输出结果对象, 如:{x: 123, y: 321},返回undefined表示不可见
9
9
  */
10
- function ndcToWindowPosition(ndc, width, height, result = {}, checkInvisible = true) {
10
+ function ndcToWindowPosition(ndc, width, height, checkInvisible = true, result = {}) {
11
11
 
12
12
  // invisible
13
- if (checkInvisible && (ndc.x < -1 || ndc.x > 1 || ndc.y < -1 || ndc.y > 1 || ndc.z < 0 || ndc.z > 1))
13
+ if (checkInvisible && (ndc.x < -1 || ndc.x > 1 || ndc.y < -1 || ndc.y > 1))
14
14
  return;
15
15
 
16
16
  const x = (ndc.x + 1) / 2 * width;