ensureRangeOpen {babsim.hospital}R Documentation

ensureRangeOpen

Description

Ensure that value belongs to the open interval ]a,b[

Usage

ensureRangeOpen(x, a, b)

Arguments

x

value

a

lower limit

b

upper limit

Value

corrected value

Examples

# return 1:
ensureRangeOpen(x = 10, a = 0, b = 1)
# return 0:
ensureRangeOpen(x = 0, a = 0, b = 1)
# return 0.5:
ensureRangeOpen(x = 0.5, a = 0, b = 1)

[Package babsim.hospital version 11.8.4 Index]