@galacean/engine-math 1.3.0-alpha.0 → 1.3.0-alpha.1
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/dist/main.js +9 -0
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +9 -0
- package/dist/module.js +9 -0
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
- package/types/MathUtil.d.ts +8 -0
package/dist/main.js
CHANGED
|
@@ -93,6 +93,15 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
93
93
|
*/ MathUtil.degreeToRadian = function degreeToRadian(d) {
|
|
94
94
|
return d * MathUtil.degreeToRadFactor;
|
|
95
95
|
};
|
|
96
|
+
/**
|
|
97
|
+
* Linearly interpolate between two values
|
|
98
|
+
* @param start - Specify the start of the range in which to interpolate
|
|
99
|
+
* @param end - Specify the end of the range in which to interpolate
|
|
100
|
+
* @param t - The blend amount where 0 returns start and 1 end
|
|
101
|
+
* @returns The result of linear blending between start and end
|
|
102
|
+
*/ MathUtil.lerp = function lerp(start, end, t) {
|
|
103
|
+
return start + (end - start) * t;
|
|
104
|
+
};
|
|
96
105
|
return MathUtil;
|
|
97
106
|
}();
|
|
98
107
|
(function() {
|