package bimage

  1. Overview
  2. Docs

Module Bimage.KindSource

Sourceval name : ('a, 'b) kind -> string

name k returns the name of a given kind

Sourceval depth : ('a, 'b) kind -> int

returns the number of bits for a given kind

Sourceval max : ('a, 'b) kind -> 'a

max k returns the maximum normalized value for k

Sourceval min : ('a, 'b) kind -> 'a

min k returns the minimum normalized value for k

Sourceval max_f : ('a, 'b) kind -> float

max k returns the maximum normalized value for k as a float

Sourceval min_f : ('a, 'b) kind -> float

min k returns the minimum normalized value for k as a float

Sourceval to_float : ('a, 'b) kind -> 'a -> float

to_float k x converts a value of kind k to float

Sourceval of_float : ('a, 'b) kind -> float -> 'a

of_float k x converts a float to a value of kind k

Sourceval clamp : ('a, 'b) kind -> float -> float

Converts a float value to a value within the proper range for the given kind

Sourceval normalize : ('a, 'b) kind -> float -> float

Scales a value to the range 0.0-1.0

Sourceval denormalize : ('a, 'b) kind -> float -> float

Sclaes a value to the range (kind_min-kind_max)

Sourceval convert : from:('a, 'b) kind -> ('c, 'd) kind -> 'a -> 'c