Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "clamp"

Index

Functions

Functions

Const clamp

  • Clamps all color channels to [0,1] interval and calls ensureAlpha to ensure alpha channel is defined (if missing sets it to alpha, default: 1).

    Parameters

    • out: Color | null

      result

    • src: ReadonlyColor

      source color

    • Default value alpha: number = 1

      alpha value

    Returns Vec

Const clampH

  • Similar to clamp, but calls ensureHue to fold (instead of clamping) the hue into [0,1] interval.

    Parameters

    • out: Color | null

      result

    • src: ReadonlyColor

      source color

    • Default value alpha: number = 1

      alpha value

    Returns Vec

Generated using TypeDoc