normalize01: normalization for mixed colors

Description Usage Arguments Details Value Author(s) See Also

Description

Normalize numbers -> [0, 1]

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
normalize01(x, ...)

## S4 method for signature 'matrix'
normalize01(x, tolerance = hy.getOption("tolerance"))

## S4 method for signature 'numeric'
normalize01(x, tolerance = hy.getOption("tolerance"))

## S4 method for signature 'hyperSpec'
normalize01(x, ...)

Arguments

x

vector with values to transform

...

additional parameters such as tolerance handed down.

tolerance

tolerance level for determining what is 0 and 1

Details

The input x is mapped to [0, 1] by subtracting the minimum and subsequently dividing by the maximum. If all elements of x are equal, 1 is returned.

Value

vector with x values mapped to the interval [0, 1]

Author(s)

C. Beleites

See Also

wl.eval, vanderMonde


hyperSpec documentation built on May 2, 2019, 5:45 p.m.