20 int32_t power = 0)
const
24 desc.
symbol =
const_cast<char*
>(symbol);
41 int32_t power = 0)
const
59 int32_t power = 0)
const
63 desc.
symbol =
const_cast<char*
>(symbol);
78template <
typename Quantity>
void ecs_add_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t component)
Add a (component) ID to an entity.
ecs_entity_t entity_t
Entity type.
#define ecs_add_pair(world, subject, first, second)
Add a pair to an entity.
Used with ecs_unit_init().
ecs_entity_t base
Base unit, e.g., "meters" (optional).
ecs_entity_t over
Over unit, e.g., "per second" (optional).
const char * symbol
Unit symbol, e.g., "m", "%", "g".
ecs_entity_t prefix
Prefix indicating order of magnitude relative to the derived unit.
ecs_unit_translation_t translation
Translation to apply to derived unit (optional).
ecs_entity_t entity
Existing entity to associate with unit (optional).
Used with ecs_unit_prefix_init().
ecs_entity_t entity
Existing entity to associate with unit prefix (optional).
const char * symbol
Unit prefix symbol, e.g., "K", "M", "Ki".
ecs_unit_translation_t translation
Translation to apply to derived unit (optional).
int32_t power
Power to apply to factor (e.g., "1", "3", "-9").
int32_t factor
Factor to apply (e.g., "1000", "1000000", "1024").