Epok Engine

EPOK RUNTIME

epok::fixed_in_range

Function · 1 overload

Function

Performs `fixed in range` as part of the world2d module.

Belongs to
epok
Header
world2d.hpp
Overloads
1

Declaration

Declaration
inline bool fixed_in_range(Fixed value, Fixed limit)

Performs `fixed in range` as part of the world2d module.

ParameterTypeMeaning
valueFixedValue supplied for value. Keep referenced or pointed-to data valid for the complete call.
limitFixedValue supplied for limit. Keep referenced or pointed-to data valid for the complete call.

Returns: bool. Check the value before continuing when it represents success, availability or a resource handle.

Example

C++ example
#include "world2d.hpp"

// Assume these named values have been initialized with valid data:
// Fixed value
// Fixed limit

auto result = epok::fixed_in_range(value, limit);

Why use it

The boolean result makes success, availability or state explicit without exceptions.

Trade-offs and warnings

Check the return value; `false` is part of normal control flow for many PSX resource operations.

Declared in runtime/world2d.hpp:47

Related members