RectExtensions.Lerp

Extension Method in RectExtensions

Declaration

public static Vector2 Lerp(this Rect rect, Vector2 t)

Description

Linearly interpolates between the rect's minimum and maximum values along each axis.

Parameters

rectThe rect to interpolate between.
tThe interpolation value for each axis.

Returns

Vector2The position as a result of the interpolation.