Ubuntu.Components.mathUtils

Various mathematical utility functions. More...

Import Statement: import Ubuntu.Components 1.3

Methods

Detailed Description

Method Documentation

clamp(x, min, max)

Ensure the value x is between min and max


clampAndProject(x, xmin, xmax, ymin, ymax)

Linearly project a value x, but in addition to projectValue it's clamped to xmin/xmax first


lerp(delta, from, to)

Get the linear interpolation


projectValue(x, xmin, xmax, ymin, ymax)

Linearly project a value x from [xmin, xmax] into [ymin, ymax]