IRangeOpsF

Description

[StaticTemplate]
interface Tinman.Core.Math.IRangeOpsF
<TValue>
<TRange>
<TValueFloat>
<TRangeFloat>

Derived from

IRangeOps<TValue, TRange, TValue>

Extended by

RangeD struct
RangeF struct
RangeI struct
RangeL struct

Defines common operations for range values.

Public / Methods

Scale


[Pure]
public method Scale → (1)

factor in : TValueFloat

[>0]
The scale factor.

returns → TRangeFloat

The scaled range.

Scales this range.

Transform


[Pure]
public method Transform → (2)

value in : TValueFloat

The value to transform.

target in : TRangeFloat

The target range.

returns → TValueFloat

The transformed value.

Transforms the given value from this range to the given range.

This method transforms the given input value in with a linear function that maps start and end points of this range onto the start and end points of the given target in range, respectively. No clamping is performed by this method.