39 lines
26 KiB
Markdown
39 lines
26 KiB
Markdown
---
|
|
title: "assertGreaterThanOrEq"
|
|
excerpt: "Check that a numerical value is greater than or equal to another at runtime,"
|
|
layout: manual
|
|
---
|
|
|
|
Check that a numerical value is greater than or equal to another at runtime,
|
|
|
|
otherwise raise an error.
|
|
|
|
```js
|
|
assertGreaterThanOrEq(left: number, right: number, message: string) -> ()
|
|
```
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `left` | `number` | | Yes |
|
|
| `right` | `number` | | Yes |
|
|
| `message` | `string` | | Yes |
|
|
|
|
### Returns
|
|
|
|
`()`
|
|
|
|
|
|
### Examples
|
|
|
|
```js
|
|
assertGreaterThanOrEq(2, 1, "2 is greater than 1")
|
|
assertGreaterThanOrEq(1, 1, "1 is equal to 1")
|
|
```
|
|
|
|

|
|
|
|
|