Epok Engine

EPOK RUNTIME

epok::MathLibrary::heading_degrees

Method · 1 overload

Method

Heading of a planar vector in degrees, measured from +y towards +x, so a stick pushed forward reads 0 and a stick pushed right reads 90.

Belongs to
epok::MathLibrary
Header
gameplay_api.hpp
Overloads
1

Declaration

static
Declaration
static Fixed heading_degrees(Fixed x,Fixed y)

Heading of a planar vector in degrees, measured from +y towards +x, so a stick pushed forward reads 0 and a stick pushed right reads 90.

ParameterTypeMeaning
xFixedValue supplied for x. Keep referenced or pointed-to data valid for the complete call.
yFixedValue supplied for y. Keep referenced or pointed-to data valid for the complete call.

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

Example

C++ example
#include "gameplay_api.hpp"

// Assume these named values have been initialized with valid data:
// Fixed x
// Fixed y

auto result = epok::MathLibrary::heading_degrees(x, y);

Why use it

It provides direct, allocation-conscious access to the gameplay api module. 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/gameplay_api.hpp:195

Related members