---
title: "ge"
description: "True when `a` is greater than or equal to `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#L473"
---

# ge

True when `a` is greater than or equal to `b`.

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

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

## Parameters

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

## Example

```ts
const rightHalf = select(ge(uv.member('x'), 0.5), 1, 0)
```

## See also

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

## Used by

[CarbonFiber](/docs/components/carbonfiber)