Constants - Serabe/rinzelight GitHub Wiki

Rinzelight constants.

Every constant is a macro, and they are defined by one of the following macro:

  • rinze-constant
  • rinze-int-constant
  • rinze-double-constant

The only difference between them is that the last two forces a primitive type (int and double respectively).

The ideas behind most of them come from ImageMagick.

Constants

(quantum-range) (int)

(quantum-range) is the maximum value a channel can take. In Java it is 255, but use this macro instead of the proper value.

(opaque-opacity) (int)

Value for the alpha channel of an opaque pixel. In rinzelight, it is the same as (quantum-range) but, for example, in Image Magick it is 0.

(transparent-opacity) (int)

Same as before, but for a transparent pixel. In rinzelight, it is 0.

(quantum-scale) (double)

Inverse of (quantum-range).

(epsilon) (double)

Smallest value different than zero considered by rinzelight. Useful for calculating the proper gamma when normalizing a kernel, for example. When you are dividing by a number that is likely to be really small, compare first to (epsilon).

(sq2pi) (double)

Square root of two times PI.

⚠️ **GitHub.com Fallback** ⚠️