transform

fun transform(data: List<Vector2fc>, xPos: Float, tension: Float, onOutOfBounds: CurveUtil.OnOutOfBounds = OnOutOfBounds.CLAMP): Float

Find Y position at a given X using spline interpolation.

Parameters

data

List of 2D points representing the curve

xPos

X position to sample

tension

Spline tension in range 0, 1 (out-of-range values are normalized)

onOutOfBounds

Behavior for X values outside the curve domain, defaults to OnOutOfBounds.CLAMP