Mathf.LerpUnclamped

Switch to Manual
public static float LerpUnclamped (float a, float b, float t);

Parameters

a@param current Текущее значение.
b@param current Текущее значение.
tThe interpolation between the two floats.

Returns

float The float value as a result from the linear interpolation.

Description

Получает промежуточное значение между a и b на основании t. t ограничивается между 0 и 1.

The parameter t is not clamped and a value based on a and b is supported. If t is less than zero, or greater than one, then LerpUnclamped will result in a return value outside the range a to b.

Suppose parameter a = 0.33f, and b = 1.5f. If interpolator t = -0.25f then the return value is 0.0375f.

Details: The calculation (b - a) is 1.17f. This is scaled by 0.25f and a result of 0.2925f is obtained. Subtracting this from a (because the interpolant t is negative) results in 0.0375f.

See Also: Lerp.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961