le

True when a is less than or equal to b.

le(a: Val, b: Val): Expr

Import math from shaders/std and use math.le.

Parameters

NameTypeNotes
aVal
bVal

Example

const inBand = select(le(abs(d), width), 1, 0)

See also

  • lt — True when a is less than b.
  • gt — True when a is greater than b.
  • ge — True when a is greater than or equal to b.
  • select — ifTrue when the condition holds, otherwise ifFalse.

Used by

Goo