Flecs: ecs_unit_translation_t Struct Reference
Description: A fast entity component system (ECS) for C & C++

| Flecs v4.1 A fast entity component system (ECS) for C & C++

Loading...
Searching...
No Matches
ecs_unit_translation_t Struct Reference
C API » Addons » Meta

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

`#include <meta.h>`

## Public Attributes
int32_t | factor
| Factor to apply (e.g., "1000", "1000000", "1024").
int32_t | power
| Power to apply to factor (e.g., "1", "3", "-9").

## 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 500 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 501 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 502 of file meta.h.

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

- include/flecs/addons/meta.h