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