Epok Engine

EPOK RUNTIME

epok::scale_channel

Function · 1 overload

Function

a * b / 255 for 0..255 inputs, exact.

Belongs to
epok
Header
polygon.hpp
Overloads
1

Declaration

Declaration
inline uint32_t scale_channel(uint32_t a, uint32_t b)

a * b / 255 for 0..255 inputs, exact.

ParameterTypeMeaning
auint32_tValue supplied for a. Keep referenced or pointed-to data valid for the complete call.
buint32_tValue supplied for b. Keep referenced or pointed-to data valid for the complete call.

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

Example

C++ example
#include "polygon.hpp"

// Assume these named values have been initialized with valid data:
// uint32_t a
// uint32_t b

auto result = epok::scale_channel(a, b);

Why use it

It provides direct, allocation-conscious access to PSX polygon preparation, clipping and submission. No exception-based error path is implied by the signature.

Trade-offs and warnings

Call it only in the lifecycle phase described by the module. Validate indices, capacities and object state before use.

Declared in runtime/polygon.hpp:49

Related members