UNPKG

arcade-physics

Version:
29 lines 1.22 kB
"use strict"; /** * @author Richard Davey <rich@photonstorm.com> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const SmootherStep_1 = __importDefault(require("../SmootherStep")); /** * A Smoother Step interpolation method. * * @function Phaser.Math.Interpolation.SmootherStep * @since 3.9.0 * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations} * * @param {number} t - The percentage of interpolation, between 0 and 1. * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. * * @return {number} The interpolated value. */ const SmootherStepInterpolation = (t, min, max) => { return min + (max - min) * (0, SmootherStep_1.default)(t, 0, 1); }; exports.default = SmootherStepInterpolation; //# sourceMappingURL=SmootherStepInterpolation.js.map