Vectors in floating point

Data Structures | Functions
Vectors in floating point

Vector definition and operations. More...

## Data Structures
struct | _Eina_Vector2

## Functions
static void | eina_vector2_set (Eina_Vector2 *dst, double x, double y)
| Set parameters to vector. More...
static void | eina_vector2_array_set (Eina_Vector2 *dst, const double *v)
| Set array to vector. More...
static void | eina_vector2_copy (Eina_Vector2 *dst, const Eina_Vector2 *src)
| Copy vector. More...
static void | eina_vector2_negate (Eina_Vector2 *out, const Eina_Vector2 *v)
| Make negative vector. More...
static void | eina_vector2_add (Eina_Vector2 *out, const Eina_Vector2 *a, const Eina_Vector2 *b)
| Add two vectors. More...
static void | eina_vector2_subtract (Eina_Vector2 *out, const Eina_Vector2 *a, const Eina_Vector2 *b)
| Subtract two vectors. More...
static void | eina_vector2_scale (Eina_Vector2 *out, const Eina_Vector2 *v, double scale)
| Scale vector. More...
static double | eina_vector2_dot_product (const Eina_Vector2 *a, const Eina_Vector2 *b)
| Return the dot product of the two vectors. More...
static double | eina_vector2_length_get (const Eina_Vector2 *v)
| Return the length of the given vector. More...
static double | eina_vector2_length_square_get (const Eina_Vector2 *v)
| Return the length in square of the given vector. More...
static double | eina_vector2_distance_get (const Eina_Vector2 *a, const Eina_Vector2 *b)
| Return the distance between of two vectors. More...
static double | eina_vector2_distance_square_get (const Eina_Vector2 *a, const Eina_Vector2 *b)
| Return the distance in square between of two vectors. More...
static void | eina_vector2_normalize (Eina_Vector2 *out, const Eina_Vector2 *v)
| normalize vector. More...
static void | eina_vector2_transform (Eina_Vector2 *out, const Eina_Matrix2 *m, const Eina_Vector2 *v)
| Transform vector. More...
static void | eina_vector2_homogeneous_position_transform (Eina_Vector2 *out, const Eina_Matrix3 *m, const Eina_Vector2 *v)
| Homogeneous position transform vector. More...
static void | eina_vector2_homogeneous_direction_transform (Eina_Vector2 *out, const Eina_Matrix3 *m, const Eina_Vector2 *v)
| Homogeneous direction ransform vector. More...

## Detailed Description

Vector definition and operations.

## Function Documentation

## ◆ eina_vector2_set()

static void eina_vector2_set | ( | Eina_Vector2 * | dst,
|  | double | x,
|  | double | y
| ) |  |
| inlinestatic

Set parameters to vector.

Parameters

  dst | The resulting vector.
  x | The x component.
  y | The y component.

Since
  1.17

## ◆ eina_vector2_array_set()

static void eina_vector2_array_set | ( | Eina_Vector2 * | dst,
|  | const double * | v
| ) |  |
| inlinestatic

Set array to vector.

Parameters

  dst | The resulting vector.
  v | The the array[2] for set.

Set to vector first 2 elements from array.

Since
  1.17

## ◆ eina_vector2_copy()

static void eina_vector2_copy | ( | Eina_Vector2 * | dst,
|  | const Eina_Vector2 * | src
| ) |  |
| inlinestatic

Copy vector.

Parameters

  dst | The vector copy.
  src | The vector for copy.

Since
  1.17

## ◆ eina_vector2_negate()

static void eina_vector2_negate | ( | Eina_Vector2 * | out,
|  | const Eina_Vector2 * | v
| ) |  |
| inlinestatic

Make negative vector.

Parameters

  out | The resulting vector.
  v | The current vector.

Since
  1.17

## ◆ eina_vector2_add()

static void eina_vector2_add | ( | Eina_Vector2 * | out,
|  | const Eina_Vector2 * | a,
|  | const Eina_Vector2 * | b
| ) |  |
| inlinestatic

Add two vectors.

Parameters

  out | The resulting vector.
  a | The first member of the add.
  b | The second member of the add.

Since
  1.17

## ◆ eina_vector2_subtract()

static void eina_vector2_subtract | ( | Eina_Vector2 * | out,
|  | const Eina_Vector2 * | a,
|  | const Eina_Vector2 * | b
| ) |  |
| inlinestatic

Subtract two vectors.

Parameters

  out | The resulting vector
  a | The first member of the subtract
  b | The second member of the subtract

Since
  1.17

## ◆ eina_vector2_scale()

static void eina_vector2_scale | ( | Eina_Vector2 * | out,
|  | const Eina_Vector2 * | v,
|  | double | scale
| ) |  |
| inlinestatic

Scale vector.

Parameters

  out | The resulting vector.
  v | The vector for scale.
  scale | The scale value.

Since
  1.17

## ◆ eina_vector2_dot_product()

static double eina_vector2_dot_product | ( | const Eina_Vector2 * | a,
|  | const Eina_Vector2 * | b
| ) |  |
| inlinestatic

Return the dot product of the two vectors.

Parameters

  a | The first member.
  b | The secondt member.

Returns
  The dot product.

Since
  1.17

## ◆ eina_vector2_length_get()

static double eina_vector2_length_get | ( | const Eina_Vector2 * | v | ) |
| inlinestatic

Return the length of the given vector.

Parameters

  v | The vector.

Returns
  The length.

Since
  1.17

## ◆ eina_vector2_length_square_get()

static double eina_vector2_length_square_get | ( | const Eina_Vector2 * | v | ) |
| inlinestatic

Return the length in square of the given vector.

Parameters

  v | The vector.

Returns
  The length in square.

Since
  1.17

## ◆ eina_vector2_distance_get()

static double eina_vector2_distance_get | ( | const Eina_Vector2 * | a,
|  | const Eina_Vector2 * | b
| ) |  |
| inlinestatic

Return the distance between of two vectors.

Parameters

  a | The first vector.
  b | The second vector.

Returns
  The distance.

Since
  1.17

## ◆ eina_vector2_distance_square_get()

static double eina_vector2_distance_square_get | ( | const Eina_Vector2 * | a,
|  | const Eina_Vector2 * | b
| ) |  |
| inlinestatic

Return the distance in square between of two vectors.

Parameters

  a | The first vector.
  b | The second vector.

Returns
  The distance in square.

Since
  1.17

## ◆ eina_vector2_normalize()

static void eina_vector2_normalize | ( | Eina_Vector2 * | out,
|  | const Eina_Vector2 * | v
| ) |  |
| inlinestatic

normalize vector.

Parameters

  out | The resulting vector.
  v | The vector for normalize.

Since
  1.17

## ◆ eina_vector2_transform()

static void eina_vector2_transform | ( | Eina_Vector2 * | out,
|  | const Eina_Matrix2 * | m,
|  | const Eina_Vector2 * | v
| ) |  |
| inlinestatic

Transform vector.

Parameters

  out | The resulting vector.
  m | The matrix for transform.
  v | The ector for transform.

Since
  1.17

## ◆ eina_vector2_homogeneous_position_transform()

static void eina_vector2_homogeneous_position_transform | ( | Eina_Vector2 * | out,
|  | const Eina_Matrix3 * | m,
|  | const Eina_Vector2 * | v
| ) |  |
| inlinestatic

Homogeneous position transform vector.

Parameters

  out | The resulting vector.
  m | The matrix for transform.
  v | The ector for transform.

Since
  1.17

## ◆ eina_vector2_homogeneous_direction_transform()

static void eina_vector2_homogeneous_direction_transform | ( | Eina_Vector2 * | out,
|  | const Eina_Matrix3 * | m,
|  | const Eina_Vector2 * | v
| ) |  |
| inlinestatic

Homogeneous direction ransform vector.

Parameters

  out | The resulting vector.
  m | The matrix for transform.
  v | The ector for transform.

Since
  1.17