Flecs v4.0
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
ecs_unit_translation_t Struct Reference

Helper type to describe translation between two units. More...

#include <meta.h>

Public Attributes

int32_t factor
 Factor to apply (e.g.
 
int32_t power
 Power to apply to factor (e.g.
 

Detailed Description

Helper type to describe translation between two units.

Note that this is not intended as a generic approach to unit conversions (e.g. from celsius to fahrenheit) but to translate between units that derive from the same base (e.g. meters to kilometers).

Note that power is applied to the factor. When describing a translation of 1000, either use {factor = 1000, power = 1} or {factor = 1, power = 3}.

Definition at line 472 of file meta.h.

Member Data Documentation

◆ factor

int32_t ecs_unit_translation_t::factor

Factor to apply (e.g.

"1000", "1000000", "1024")

Definition at line 473 of file meta.h.

◆ power

int32_t ecs_unit_translation_t::power

Power to apply to factor (e.g.

"1", "3", "-9")

Definition at line 474 of file meta.h.


The documentation for this struct was generated from the following file: