---
title: "lt"
description: "True when `a` is less than `b`."
group: "space"
groupTitle: "Shapes, frames & warps"
categoryId: "math"
categorySlug: "math"
categoryTitle: "Math"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/math.ts#L443"
---

# lt

True when `a` is less than `b`.

```ts
lt(a: Val, b: Val): Expr
```

Import `math` from `shaders/std` and use `math.lt`.

A condition for `select`.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `a` | `Val` |  |
| `b` | `Val` |  |

## Example

```ts
const rgb = select(lt(dist, radius), insideRgb, outsideRgb)
```

## See also

- [`le`](/docs/primitives/math/le) — True when `a` is less than or equal to `b`.
- [`gt`](/docs/primitives/math/gt) — True when `a` is greater than `b`.
- [`ge`](/docs/primitives/math/ge) — True when `a` is greater than or equal to `b`.
- [`select`](/docs/primitives/math/select) — `ifTrue` when the condition holds, otherwise `ifFalse`.