Tizen Native API
5.5
|
Floating point numbers data type management.
Functions | |
static Eina_F32p32 | eina_f32p32_int_from (int32_t v) |
Creates a new Eina_F32p32 floating point number from standard 32-bit integer. | |
static int32_t | eina_f32p32_int_to (Eina_F32p32 v) |
Creates a new standard 32-bit integer from Eina_F32p32 floating point number. | |
static Eina_F32p32 | eina_f32p32_double_from (double v) |
Creates a new Eina_F32p32 floating point number from standard double. | |
static double | eina_f32p32_double_to (Eina_F32p32 v) |
Creates a new standard double from Eina_F32p32 floating point number. | |
static Eina_F32p32 | eina_f32p32_add (Eina_F32p32 a, Eina_F32p32 b) |
Calculates the sum of two Eina_F32p32 floating point numbers. | |
static Eina_F32p32 | eina_f32p32_sub (Eina_F32p32 a, Eina_F32p32 b) |
Calculates the subtraction of two Eina_F32p32 floating point numbers. | |
static Eina_F32p32 | eina_f32p32_mul (Eina_F32p32 a, Eina_F32p32 b) |
Calculates the multiplication of two Eina_F32p32 floating point numbers. | |
static Eina_F32p32 | eina_f32p32_scale (Eina_F32p32 a, int b) |
Calculates the scale multiplication of one Eina_F32p32 floating point number with an integer. | |
static Eina_F32p32 | eina_f32p32_div (Eina_F32p32 a, Eina_F32p32 b) |
Calculates the division of two Eina_F32p32 floating point numbers. | |
static Eina_F32p32 | eina_f32p32_sqrt (Eina_F32p32 a) |
Calculates the square root of an Eina_F32p32 floating point number. | |
static unsigned int | eina_f32p32_fracc_get (Eina_F32p32 v) |
Gets the absolute value of the integer part of and Eina_F32p32 floating point number. | |
Eina_F32p32 | eina_f32p32_cos (Eina_F32p32 a) |
Calculates the cosine of a floating point number. | |
Eina_F32p32 | eina_f32p32_sin (Eina_F32p32 a) |
Calculates the sine of a floating point number. | |
static Eina_F16p16 | eina_f16p16_int_from (int32_t v) |
Creates a new Eina_F16p316 floating point number from standard 32-bit integer. | |
static int32_t | eina_f16p16_int_to (Eina_F16p16 v) |
Creates a new standard 32-bit integer from Eina_F16p16 floating point number. | |
static Eina_F16p16 | eina_f16p16_double_from (double v) |
Creates a new Eina_F16p16 floating point number from standard double. | |
static double | eina_f16p16_double_to (Eina_F16p16 v) |
Creates a new standard double from Eina_F16p16 floating point number. | |
static Eina_F16p16 | eina_f16p16_float_from (float v) |
Creates a new Eina_F16p16 floating point number from standard float. | |
static float | eina_f16p16_float_to (Eina_F16p16 v) |
Creates a new standard float from Eina_F16p16 floating point number. | |
static Eina_F16p16 | eina_f16p16_add (Eina_F16p16 a, Eina_F16p16 b) |
Calculates the sum of two Eina_F16p16 floating point numbers. | |
static Eina_F16p16 | eina_f16p16_sub (Eina_F16p16 a, Eina_F16p16 b) |
Calculates the subtraction of two Eina_F16p16 floating point numbers. | |
static Eina_F16p16 | eina_f16p16_mul (Eina_F16p16 a, Eina_F16p16 b) |
Calculates the multiplication of two Eina_F16p16 floating point numbers. | |
static Eina_F16p16 | eina_f16p16_scale (Eina_F16p16 a, int b) |
Calculates the scale multiplication of one Eina_F16p16 floating point number with an integer. | |
static Eina_F16p16 | eina_f16p16_div (Eina_F16p16 a, Eina_F16p16 b) |
Calculates the division of two Eina_F16p16 floating point numbers. | |
static Eina_F16p16 | eina_f16p16_sqrt (Eina_F16p16 a) |
Calculates the square root of an Eina_F16p16 floating point number. | |
static unsigned int | eina_f16p16_fracc_get (Eina_F16p16 v) |
Gets the absolute value of the integer part of and Eina_F16p16 floating point number. | |
static Eina_F8p24 | eina_f8p24_int_from (int32_t v) |
Creates a new Eina_F16p316 floating point number from standard 32-bit integer. | |
static int32_t | eina_f8p24_int_to (Eina_F8p24 v) |
Creates a new standard 32-bit integer from Eina_F8p24 floating point number. | |
static Eina_F8p24 | eina_f8p24_float_from (float v) |
Creates a new Eina_F8p24 floating point number from standard float. | |
static float | eina_f8p24_float_to (Eina_F8p24 v) |
Create a new standard float from Eina_F8p24 floating point number. | |
static Eina_F8p24 | eina_f8p24_add (Eina_F8p24 a, Eina_F8p24 b) |
Calculates the sum of two Eina_F8p24 floating point numbers. | |
static Eina_F8p24 | eina_f8p24_sub (Eina_F8p24 a, Eina_F8p24 b) |
Calculates the subtraction of two Eina_F8p24 floating point numbers. | |
static Eina_F8p24 | eina_f8p24_mul (Eina_F8p24 a, Eina_F8p24 b) |
Calculates the multiplication of two Eina_F8p24 floating point numbers. | |
static Eina_F8p24 | eina_f8p24_scale (Eina_F8p24 a, int b) |
Calculates the scale multiplication of one Eina_F8p24 floating point number with an integer. | |
static Eina_F8p24 | eina_f8p24_div (Eina_F8p24 a, Eina_F8p24 b) |
Calculates the division of two Eina_F8p24 floating point numbers. | |
static Eina_F8p24 | eina_f8p24_sqrt (Eina_F8p24 a) |
Calculates the square root of an Eina_F8p24 floating point number. | |
static unsigned int | eina_f8p24_fracc_get (Eina_F8p24 v) |
Gets the absolute value of the integer part of and Eina_F8p24 floating point number. | |
static Eina_F32p32 | eina_f16p16_to_f32p32 (Eina_F16p16 a) |
Converts an Eina_F16p16 floating point number into Eina_F32p32 format. | |
static Eina_F32p32 | eina_f8p24_to_f32p32 (Eina_F8p24 a) |
Converts an Eina_F8p24 floating point number into Eina_F32p32 format. | |
static Eina_F16p16 | eina_f32p32_to_f16p16 (Eina_F32p32 a) |
Converts an Eina_F32p32 floating point number into Eina_F16p16 format. | |
static Eina_F16p16 | eina_f8p24_to_f16p16 (Eina_F8p24 a) |
Converts an Eina_F8p24 floating point number into Eina_F16p16 format. | |
static Eina_F8p24 | eina_f32p32_to_f8p24 (Eina_F32p32 a) |
Converts an Eina_F32p32 floating point number into Eina_F8p24 format. | |
static Eina_F8p24 | eina_f16p16_to_f8p24 (Eina_F16p16 a) |
Converts an Eina_F16p16 floating point number into Eina_F8p16 format. | |
Typedefs | |
typedef int64_t | Eina_F32p32 |
typedef int32_t | Eina_F16p16 |
typedef int32_t | Eina_F8p24 |
Defines | |
#define | EINA_F32P32_PI 0x00000003243f6a89 |
Yields the 32-bit PI constant. | |
#define | eina_fp32p32_llabs(a) ((a < 0) ? -(a) : (a)) |
Gets the absolute value of an Eina_F32p32 floating point number. | |
#define | EINA_F16P16_ONE (1 << 16) |
#define | EINA_F16P16_HALF (1 << 15) |
#define EINA_F16P16_HALF (1 << 15) |
Yields the maximum 16-bit signed integer size (= 32768)
#define EINA_F16P16_ONE (1 << 16) |
Yields the maximum 16-bit unsigned integer size (= 65536)
#define eina_fp32p32_llabs | ( | a | ) | ((a < 0) ? -(a) : (a)) |
Gets the absolute value of an Eina_F32p32 floating point number.
[in] | a | The floating point number |
a
Type for floating point number where the size of the integer part is 16-bit and the size of the decimal part is 16-bit
Type for floating point number where the size of the integer part is 32-bit and the size of the decimal part is 32-bit
Type for floating point number where the size of the integer part is 8-bit and the size of the decimal part is 24bits
static Eina_F16p16 eina_f16p16_add | ( | Eina_F16p16 | a, |
Eina_F16p16 | b | ||
) | [static] |
Calculates the sum of two Eina_F16p16 floating point numbers.
[in] | a | The first number |
[in] | b | The second number |
a
+ b
static Eina_F16p16 eina_f16p16_div | ( | Eina_F16p16 | a, |
Eina_F16p16 | b | ||
) | [static] |
Calculates the division of two Eina_F16p16 floating point numbers.
[in] | a | The numerator number |
[in] | b | The denominator number |
a
/ b
static Eina_F16p16 eina_f16p16_double_from | ( | double | v | ) | [static] |
Creates a new Eina_F16p16 floating point number from standard double.
[in] | v | Double value to convert |
static double eina_f16p16_double_to | ( | Eina_F16p16 | v | ) | [static] |
Creates a new standard double from Eina_F16p16 floating point number.
[in] | v | Eina_F16p16 value to convert |
static Eina_F16p16 eina_f16p16_float_from | ( | float | v | ) | [static] |
Creates a new Eina_F16p16 floating point number from standard float.
[in] | v | Float value to convert |
static float eina_f16p16_float_to | ( | Eina_F16p16 | v | ) | [static] |
Creates a new standard float from Eina_F16p16 floating point number.
[in] | v | Eina_F16p16 value to convert |
static unsigned int eina_f16p16_fracc_get | ( | Eina_F16p16 | v | ) | [static] |
Gets the absolute value of the integer part of and Eina_F16p16 floating point number.
[in] | v | The floating point number |
v
static Eina_F16p16 eina_f16p16_int_from | ( | int32_t | v | ) | [static] |
Creates a new Eina_F16p316 floating point number from standard 32-bit integer.
[in] | v | 32-bit integer value to convert |
static int32_t eina_f16p16_int_to | ( | Eina_F16p16 | v | ) | [static] |
Creates a new standard 32-bit integer from Eina_F16p16 floating point number.
[in] | v | Eina_F16p16 value to convert |
static Eina_F16p16 eina_f16p16_mul | ( | Eina_F16p16 | a, |
Eina_F16p16 | b | ||
) | [static] |
Calculates the multiplication of two Eina_F16p16 floating point numbers.
[in] | a | The first number |
[in] | b | The second number |
a
* b
static Eina_F16p16 eina_f16p16_scale | ( | Eina_F16p16 | a, |
int | b | ||
) | [static] |
Calculates the scale multiplication of one Eina_F16p16 floating point number with an integer.
[in] | a | The Eina_F16p16 number |
[in] | b | The integer value |
a
* b
static Eina_F16p16 eina_f16p16_sqrt | ( | Eina_F16p16 | a | ) | [static] |
Calculates the square root of an Eina_F16p16 floating point number.
[in] | a | The number to calculate the square root from |
a
static Eina_F16p16 eina_f16p16_sub | ( | Eina_F16p16 | a, |
Eina_F16p16 | b | ||
) | [static] |
Calculates the subtraction of two Eina_F16p16 floating point numbers.
[in] | a | The first number |
[in] | b | The subtracted number |
a
- b
static Eina_F32p32 eina_f16p16_to_f32p32 | ( | Eina_F16p16 | a | ) | [static] |
Converts an Eina_F16p16 floating point number into Eina_F32p32 format.
[in] | a | The Eina_F16p16 floating point number |
static Eina_F8p24 eina_f16p16_to_f8p24 | ( | Eina_F16p16 | a | ) | [static] |
Converts an Eina_F16p16 floating point number into Eina_F8p16 format.
[in] | a | The Eina_F16p16 floating point number |
static Eina_F32p32 eina_f32p32_add | ( | Eina_F32p32 | a, |
Eina_F32p32 | b | ||
) | [static] |
Calculates the sum of two Eina_F32p32 floating point numbers.
[in] | a | The first number |
[in] | b | The second number |
a
+ b
Calculates the cosine of a floating point number.
[in] | a | The angle in radians to calculate the cosine from. |
a
static Eina_F32p32 eina_f32p32_div | ( | Eina_F32p32 | a, |
Eina_F32p32 | b | ||
) | [static] |
Calculates the division of two Eina_F32p32 floating point numbers.
[in] | a | The numerator number |
[in] | b | The denominator number |
a
/ b
static Eina_F32p32 eina_f32p32_double_from | ( | double | v | ) | [static] |
Creates a new Eina_F32p32 floating point number from standard double.
[in] | v | Double value to convert |
static double eina_f32p32_double_to | ( | Eina_F32p32 | v | ) | [static] |
Creates a new standard double from Eina_F32p32 floating point number.
[in] | v | Eina_F32p32 value to convert |
static unsigned int eina_f32p32_fracc_get | ( | Eina_F32p32 | v | ) | [static] |
Gets the absolute value of the integer part of and Eina_F32p32 floating point number.
[in] | v | The floating point number |
v
static Eina_F32p32 eina_f32p32_int_from | ( | int32_t | v | ) | [static] |
Creates a new Eina_F32p32 floating point number from standard 32-bit integer.
[in] | v | 32-bit integer value to convert |
static int32_t eina_f32p32_int_to | ( | Eina_F32p32 | v | ) | [static] |
Creates a new standard 32-bit integer from Eina_F32p32 floating point number.
[in] | v | Eina_F32p32 value to convert |
static Eina_F32p32 eina_f32p32_mul | ( | Eina_F32p32 | a, |
Eina_F32p32 | b | ||
) | [static] |
Calculates the multiplication of two Eina_F32p32 floating point numbers.
[in] | a | The first number |
[in] | b | The second number |
a
* b
To prevent overflow during multiplication we need to reduce the precision of the fraction part Shift both values to only contain 16 bit of the fraction part (rounded). After multiplication we again have a value with a 32-bit fraction part.
static Eina_F32p32 eina_f32p32_scale | ( | Eina_F32p32 | a, |
int | b | ||
) | [static] |
Calculates the scale multiplication of one Eina_F32p32 floating point number with an integer.
[in] | a | The Eina_F32p32 number |
[in] | b | The integer value |
a
* b
Calculates the sine of a floating point number.
[in] | a | The angle in radians to calculate the sine from. |
a
static Eina_F32p32 eina_f32p32_sqrt | ( | Eina_F32p32 | a | ) | [static] |
Calculates the square root of an Eina_F32p32 floating point number.
[in] | a | The number to calculate the square root from |
a
static Eina_F32p32 eina_f32p32_sub | ( | Eina_F32p32 | a, |
Eina_F32p32 | b | ||
) | [static] |
Calculates the subtraction of two Eina_F32p32 floating point numbers.
[in] | a | The first number |
[in] | b | The subtracted number |
a
- b
static Eina_F16p16 eina_f32p32_to_f16p16 | ( | Eina_F32p32 | a | ) | [static] |
Converts an Eina_F32p32 floating point number into Eina_F16p16 format.
[in] | a | The Eina_F32p32 floating point number |
static Eina_F8p24 eina_f32p32_to_f8p24 | ( | Eina_F32p32 | a | ) | [static] |
Converts an Eina_F32p32 floating point number into Eina_F8p24 format.
[in] | a | The Eina_F32p32 floating point number |
static Eina_F8p24 eina_f8p24_add | ( | Eina_F8p24 | a, |
Eina_F8p24 | b | ||
) | [static] |
Calculates the sum of two Eina_F8p24 floating point numbers.
[in] | a | The first number |
[in] | b | The second number |
a
+ b
static Eina_F8p24 eina_f8p24_div | ( | Eina_F8p24 | a, |
Eina_F8p24 | b | ||
) | [static] |
Calculates the division of two Eina_F8p24 floating point numbers.
[in] | a | The numerator number |
[in] | b | The denominator number |
a
/ b
static Eina_F8p24 eina_f8p24_float_from | ( | float | v | ) | [static] |
Creates a new Eina_F8p24 floating point number from standard float.
[in] | v | Float value to convert |
static float eina_f8p24_float_to | ( | Eina_F8p24 | v | ) | [static] |
Create a new standard float from Eina_F8p24 floating point number.
[in] | v | Eina_F8p24 value to convert |
static unsigned int eina_f8p24_fracc_get | ( | Eina_F8p24 | v | ) | [static] |
Gets the absolute value of the integer part of and Eina_F8p24 floating point number.
[in] | v | The floating point number |
v
static Eina_F8p24 eina_f8p24_int_from | ( | int32_t | v | ) | [static] |
Creates a new Eina_F16p316 floating point number from standard 32-bit integer.
[in] | v | 32-bit integer value to convert |
static int32_t eina_f8p24_int_to | ( | Eina_F8p24 | v | ) | [static] |
Creates a new standard 32-bit integer from Eina_F8p24 floating point number.
[in] | v | Eina_F8p24 value to convert |
static Eina_F8p24 eina_f8p24_mul | ( | Eina_F8p24 | a, |
Eina_F8p24 | b | ||
) | [static] |
Calculates the multiplication of two Eina_F8p24 floating point numbers.
[in] | a | The first number |
[in] | b | The second number |
a
* b
static Eina_F8p24 eina_f8p24_scale | ( | Eina_F8p24 | a, |
int | b | ||
) | [static] |
Calculates the scale multiplication of one Eina_F8p24 floating point number with an integer.
[in] | a | The Eina_F16p16 number |
[in] | b | The integer value |
a
* b
static Eina_F8p24 eina_f8p24_sqrt | ( | Eina_F8p24 | a | ) | [static] |
Calculates the square root of an Eina_F8p24 floating point number.
[in] | a | The number to calculate the square root from |
a
static Eina_F8p24 eina_f8p24_sub | ( | Eina_F8p24 | a, |
Eina_F8p24 | b | ||
) | [static] |
Calculates the subtraction of two Eina_F8p24 floating point numbers.
[in] | a | The first number |
[in] | b | The subtracted number |
a
- b
static Eina_F16p16 eina_f8p24_to_f16p16 | ( | Eina_F8p24 | a | ) | [static] |
Converts an Eina_F8p24 floating point number into Eina_F16p16 format.
[in] | a | The Eina_F8p24 floating point number |
static Eina_F32p32 eina_f8p24_to_f32p32 | ( | Eina_F8p24 | a | ) | [static] |
Converts an Eina_F8p24 floating point number into Eina_F32p32 format.
[in] | a | The Eina_F8p24 floating point number |