manpagez: man pages & more
html files: graphene
Home | html | info | man

SIMD vector

SIMD vector — Low level floating point 4-sized vector

Functions

graphene_simd4f_t graphene_simd4f_init ()
graphene_simd4f_t graphene_simd4f_init_zero ()
graphene_simd4f_t graphene_simd4f_init_4f ()
graphene_simd4f_t graphene_simd4f_init_3f ()
graphene_simd4f_t graphene_simd4f_init_2f ()
void graphene_simd4f_dup_4f ()
void graphene_simd4f_dup_3f ()
void graphene_simd4f_dup_2f ()
float graphene_simd4f_get ()
float graphene_simd4f_get_x ()
float graphene_simd4f_get_y ()
float graphene_simd4f_get_z ()
float graphene_simd4f_get_w ()
graphene_simd4f_t graphene_simd4f_splat ()
graphene_simd4f_t graphene_simd4f_splat_x ()
graphene_simd4f_t graphene_simd4f_splat_y ()
graphene_simd4f_t graphene_simd4f_splat_z ()
graphene_simd4f_t graphene_simd4f_splat_w ()
graphene_simd4f_t graphene_simd4f_add ()
graphene_simd4f_t graphene_simd4f_sub ()
graphene_simd4f_t graphene_simd4f_mul ()
graphene_simd4f_t graphene_simd4f_div ()
graphene_simd4f_t graphene_simd4f_sqrt ()
graphene_simd4f_t graphene_simd4f_reciprocal ()
graphene_simd4f_t graphene_simd4f_rsqrt ()
graphene_simd4f_t graphene_simd4f_cross3 ()
graphene_simd4f_t graphene_simd4f_min ()
graphene_simd4f_t graphene_simd4f_max ()
graphene_simd4f_t graphene_simd4f_min_val ()
graphene_simd4f_t graphene_simd4f_max_val ()
graphene_simd4f_t graphene_simd4f_clamp ()
graphene_simd4f_t graphene_simd4f_clamp_scalar ()
graphene_simd4f_t graphene_simd4f_shuffle_wxyz ()
graphene_simd4f_t graphene_simd4f_shuffle_zwxy ()
graphene_simd4f_t graphene_simd4f_shuffle_yzwx ()
graphene_simd4f_t graphene_simd4f_zero_w ()
graphene_simd4f_t graphene_simd4f_zero_zw ()
graphene_simd4f_t graphene_simd4f_merge_w ()
graphene_simd4f_t graphene_simd4f_merge_high ()
graphene_simd4f_t graphene_simd4f_merge_low ()
graphene_simd4f_t graphene_simd4f_flip_sign_0101 ()
graphene_simd4f_t graphene_simd4f_flip_sign_1010 ()
bool graphene_simd4f_cmp_eq ()
bool graphene_simd4f_cmp_neq ()
bool graphene_simd4f_cmp_lt ()
bool graphene_simd4f_cmp_le ()
bool graphene_simd4f_cmp_ge ()
bool graphene_simd4f_cmp_gt ()
graphene_simd4f_t graphene_simd4f_neg ()
graphene_simd4f_t graphene_simd4f_madd ()
graphene_simd4f_t graphene_simd4f_sum ()
float graphene_simd4f_sum_scalar ()
graphene_simd4f_t graphene_simd4f_dot4 ()
graphene_simd4f_t graphene_simd4f_dot3 ()
float graphene_simd4f_dot3_scalar ()
graphene_simd4f_t graphene_simd4f_dot2 ()
graphene_simd4f_t graphene_simd4f_length4 ()
graphene_simd4f_t graphene_simd4f_length3 ()
graphene_simd4f_t graphene_simd4f_length2 ()
graphene_simd4f_t graphene_simd4f_normalize4 ()
graphene_simd4f_t graphene_simd4f_normalize3 ()
graphene_simd4f_t graphene_simd4f_normalize2 ()
bool graphene_simd4f_is_zero4 ()
bool graphene_simd4f_is_zero3 ()
bool graphene_simd4f_is_zero2 ()
graphene_simd4f_t graphene_simd4f_interpolate ()

Types and Values

Includes

#include <graphene.h>

Description

The graphene_simd4f_t type wraps a platform specific implementation of a vector of four floating point values.

Graphene can be compiled to use different implementations of the SIMD types, and will generally prefer the faster hardware-backed implementation if one is available.

The graphene_simd4f_t should be treated as an opaque, integral type; you cannot access its components directly, and you can only operate on all components at the same time.

Functions

graphene_simd4f_init ()

graphene_simd4f_t
graphene_simd4f_init (float x,
                      float y,
                      float z,
                      float w);

Initializes a graphene_simd4f_t with the given values.

Parameters

x

the first component of the vector

 

y

the second component of the vector

 

z

the third component of the vector

 

w

the fourth component of the vector

 

Returns

the initialized graphene_simd4f_t

Since: 1.0


graphene_simd4f_init_zero ()

graphene_simd4f_t
graphene_simd4f_init_zero (void);

Initializes a graphene_simd4f_t with 0 in all components.

Returns

the initialized graphene_simd4f_t

Since: 1.0


graphene_simd4f_init_4f ()

graphene_simd4f_t
graphene_simd4f_init_4f (const float *v);

Initializes a graphene_simd4f_t using an array of 4 floating point values.

Parameters

v

an array of at least 4 floating point values.

[array fixed-size=4]

Returns

the initialized graphene_simd4f_t

Since: 1.0


graphene_simd4f_init_3f ()

graphene_simd4f_t
graphene_simd4f_init_3f (const float *v);

Initializes a graphene_simd4f_t using an array of 3 floating point values.

Parameters

v

an array of at least 3 floating point values.

[array fixed-size=3]

Returns

the initialized graphene_simd4f_t

Since: 1.0


graphene_simd4f_init_2f ()

graphene_simd4f_t
graphene_simd4f_init_2f (const float *v);

Initializes a graphene_simd4f_t using an array of 2 floating point values.

Parameters

v

an array of at least 2 floating point values.

[array fixed-size=2]

Returns

the initialized graphene_simd4f_t

Since: 1.0


graphene_simd4f_dup_4f ()

void
graphene_simd4f_dup_4f (const graphene_simd4f_t s,
                        float *v);

Copies the contents of a graphene_simd4f_t into an array of floating points.

Parameters

s

a graphene_simd4f_t

 

v

return location for an array of at least 4 floating point values.

[out][array fixed-size=4]

Since: 1.0


graphene_simd4f_dup_3f ()

void
graphene_simd4f_dup_3f (const graphene_simd4f_t s,
                        float *v);

Copies the contents of a graphene_simd4f_t into an array of floating points.

Parameters

s

a graphene_simd4f_t

 

v

return location for an array of at least 3 floating point values.

[out][array fixed-size=3]

Since: 1.0


graphene_simd4f_dup_2f ()

void
graphene_simd4f_dup_2f (const graphene_simd4f_t s,
                        float *v);

Copies the contents of a graphene_simd4f_t into an array of floating points.

Parameters

s

a graphene_simd4f_t

 

v

return location for an array of at least 2 floating point values.

[out][array fixed-size=2]

Since: 1.0


graphene_simd4f_get ()

float
graphene_simd4f_get (const graphene_simd4f_t s,
                     unsigned int i);

Retrieves the given component of a graphene_simd4f_t.

Parameters

s

a graphene_simd4f_t

 

i

the index of the component to retrieve

 

Since: 1.2


graphene_simd4f_get_x ()

float
graphene_simd4f_get_x (const graphene_simd4f_t s);

Retrieves the first component of s .

Parameters

Returns

the first component of a graphene_simd4f_t

Since: 1.0


graphene_simd4f_get_y ()

float
graphene_simd4f_get_y (const graphene_simd4f_t s);

Retrieves the second component of s .

Parameters

Returns

the second component of a graphene_simd4f_t

Since: 1.0


graphene_simd4f_get_z ()

float
graphene_simd4f_get_z (const graphene_simd4f_t s);

Retrieves the third component of s .

Parameters

Returns

the third component of a graphene_simd4f_t

Since: 1.0


graphene_simd4f_get_w ()

float
graphene_simd4f_get_w (const graphene_simd4f_t s);

Retrieves the fourth component of s .

Parameters

Returns

the fourth component of a graphene_simd4f_t

Since: 1.0


graphene_simd4f_splat ()

graphene_simd4f_t
graphene_simd4f_splat (float v);

Sets all the components of a new graphene_simd4f_t to the same value v :

1
2
3
4
5
6
{
  .x = v,
  .y = v,
  .z = v,
  .w = v
};

Parameters

v

a floating point value

 

Returns

the initialized graphene_simd4f_t

Since: 1.0


graphene_simd4f_splat_x ()

graphene_simd4f_t
graphene_simd4f_splat_x (const graphene_simd4f_t s);

Sets all the components of a new graphene_simd4f_t to the same value of the first component of the passed vector:

1
2
3
4
5
6
{
  .x = s.x,
  .y = s.x,
  .z = s.x,
  .w = s.x
}

Parameters

Returns

the initialized graphene_simd4f_t

Since: 1.0


graphene_simd4f_splat_y ()

graphene_simd4f_t
graphene_simd4f_splat_y (const graphene_simd4f_t s);

Sets all the components of a new graphene_simd4f_t to the same value of the second component of the passed vector:

1
2
3
4
5
6
{
  .x = s.y,
  .y = s.y,
  .z = s.y,
  .w = s.y
}

Parameters

Returns

the initialized graphene_simd4f_t

Since: 1.0


graphene_simd4f_splat_z ()

graphene_simd4f_t
graphene_simd4f_splat_z (const graphene_simd4f_t s);

Sets all the components of a graphene_simd4f_t to the same value of the third component of the passed vector:

1
2
3
4
5
6
{
  .x = s.z,
  .y = s.z,
  .z = s.z,
  .w = s.z
}

Parameters

Returns

the initialized graphene_simd4f_t

Since: 1.0


graphene_simd4f_splat_w ()

graphene_simd4f_t
graphene_simd4f_splat_w (const graphene_simd4f_t s);

Sets all the components of a graphene_simd4f_t to the same value of the fourth component of the passed vector:

1
2
3
4
5
6
{
  .x = s.w,
  .y = s.w,
  .z = s.w,
  .w = s.w
}

Parameters

Returns

the initialized graphene_simd4f_t

Since: 1.0


graphene_simd4f_add ()

graphene_simd4f_t
graphene_simd4f_add (const graphene_simd4f_t a,
                     const graphene_simd4f_t b);

Creates a new graphene_simd4f_t vector where each component is the sum of the respective components in a and b .

1
2
3
4
5
6
{
  .x = a.x + b.x,
  .y = a.y + b.y,
  .z = a.z + b.z,
  .w = a.w + b.w
}

Parameters

Returns

the sum vector

Since: 1.0


graphene_simd4f_sub ()

graphene_simd4f_t
graphene_simd4f_sub (const graphene_simd4f_t a,
                     const graphene_simd4f_t b);

Creates a new graphene_simd4f_t vector where each component is the subtraction of the respective components in a and b .

1
2
3
4
5
6
{
  .x = a.x - b.x,
  .y = a.y - b.y,
  .z = a.z - b.z,
  .w = a.w - b.w
}

Parameters

Returns

the subtraction vector

Since: 1.0


graphene_simd4f_mul ()

graphene_simd4f_t
graphene_simd4f_mul (const graphene_simd4f_t a,
                     const graphene_simd4f_t b);

Creates a new graphene_simd4f_t vector where each component is the multiplication of the respective components in a and b .

1
2
3
4
5
6
{
  .x = a.x * b.x,
  .y = a.y * b.y,
  .z = a.z * b.z,
  .w = a.w * b.w
}

Parameters

Returns

the multiplication vector

Since: 1.0


graphene_simd4f_div ()

graphene_simd4f_t
graphene_simd4f_div (const graphene_simd4f_t a,
                     const graphene_simd4f_t b);

Creates a new graphene_simd4f_t vector where each component is the division of the respective components in a and b .

1
2
3
4
5
6
{
  .x = a.x / b.x,
  .y = a.y / b.y,
  .z = a.z / b.z,
  .w = a.w / b.w
}

Parameters

Returns

the division vector

Since: 1.0


graphene_simd4f_sqrt ()

graphene_simd4f_t
graphene_simd4f_sqrt (const graphene_simd4f_t s);

Computes the square root of every component of s .

1
2
3
4
5
6
{
  .x = sqrt (s.x),
  .y = sqrt (s.y),
  .z = sqrt (s.z),
  .w = sqrt (s.w)
}

Parameters

Returns

a vector containing the square root of the passed vector

Since: 1.0


graphene_simd4f_reciprocal ()

graphene_simd4f_t
graphene_simd4f_reciprocal (const graphene_simd4f_t s);

Computes the reciprocal of every component of s .

1
2
3
4
5
6
{
  .x = 1.0 / s.x,
  .y = 1.0 / s.y,
  .z = 1.0 / s.z,
  .w = 1.0 / s.w
}

Parameters

Returns

a vector containing the reciprocal of the passed vector

Since: 1.0


graphene_simd4f_rsqrt ()

graphene_simd4f_t
graphene_simd4f_rsqrt (const graphene_simd4f_t s);

Computes the reciprocal square root of every component of s .

1
2
3
4
5
6
{
  .x = 1.0 / sqrt (s.x),
  .y = 1.0 / sqrt (s.y),
  .z = 1.0 / sqrt (s.z),
  .w = 1.0 / sqrt (s.w)
}

Parameters

Returns

a vector containing the reciprocal square root of the passed vector

Since: 1.0


graphene_simd4f_cross3 ()

graphene_simd4f_t
graphene_simd4f_cross3 (const graphene_simd4f_t a,
                        const graphene_simd4f_t b);

Creates a new graphene_simd4f_t vector where each component contains the 3-way cross product of the given a and b vectors.

Parameters

Returns

the cross3 vector

Since: 1.0


graphene_simd4f_min ()

graphene_simd4f_t
graphene_simd4f_min (const graphene_simd4f_t a,
                     const graphene_simd4f_t b);

Creates a new graphene_simd4f_t that contains the minimum value of each component of a and b .

Parameters

Returns

the new minimum vector

Since: 1.0


graphene_simd4f_max ()

graphene_simd4f_t
graphene_simd4f_max (const graphene_simd4f_t a,
                     const graphene_simd4f_t b);

Creates a new graphene_simd4f_t that contains the maximum value of each component of a and b .

Parameters

Returns

the new maximum vector

Since: 1.0


graphene_simd4f_min_val ()

graphene_simd4f_t
graphene_simd4f_min_val (const graphene_simd4f_t v);

Computes the minimum value of all the channels in the given vector.

Parameters

Returns

a vector whose components are all set to the minimum value in the original vector

Since: 1.4


graphene_simd4f_max_val ()

graphene_simd4f_t
graphene_simd4f_max_val (const graphene_simd4f_t v);

Computes the maximum value of all the channels in the given vector.

Parameters

Returns

a vector whose components are all set to the maximum value in the original vector

Since: 1.4


graphene_simd4f_clamp ()

graphene_simd4f_t
graphene_simd4f_clamp (const graphene_simd4f_t v,
                       const graphene_simd4f_t min,
                       const graphene_simd4f_t max);

Ensures that all components of the vector v are within the components of the lower and upper boundaries.

Parameters

v

a graphene_simd4f_t

 

min

the lower boundary

 

max

the upper boundary

 

Returns

the clamped vector

Since: 1.2


graphene_simd4f_clamp_scalar ()

graphene_simd4f_t
graphene_simd4f_clamp_scalar (const graphene_simd4f_t v,
                              float min,
                              float max);

Ensures that all components of the vector v are within the lower and upper boundary scalar values.

Parameters

v

a graphene_simd4f_t

 

min

the lower boundary

 

max

the upper boundary

 

Returns

the clamped vector

Since: 1.2


graphene_simd4f_shuffle_wxyz ()

graphene_simd4f_t
graphene_simd4f_shuffle_wxyz (const graphene_simd4f_t s);

Creates a new graphene_simd4f_t that contains the re-ordered values of the W, X, Y, and Z components of s .

Parameters

Returns

the new vector

Since: 1.0


graphene_simd4f_shuffle_zwxy ()

graphene_simd4f_t
graphene_simd4f_shuffle_zwxy (const graphene_simd4f_t s);

Creates a new graphene_simd4f_t that contains the re-ordered values of the Z, W, X, and Y components of s .

Parameters

Returns

the new vector

Since: 1.0


graphene_simd4f_shuffle_yzwx ()

graphene_simd4f_t
graphene_simd4f_shuffle_yzwx (const graphene_simd4f_t s);

Creates a new graphene_simd4f_t that contains the re-ordered values of the Y, Z, W, and X components of s .

Parameters

Returns

the new vector

Since: 1.0


graphene_simd4f_zero_w ()

graphene_simd4f_t
graphene_simd4f_zero_w (const graphene_simd4f_t s);

Creates a new graphene_simd4f_t that contains the same values of the given s vector, except for the W component, which is set to 0.

Parameters

Returns

the new vector

Since: 1.0


graphene_simd4f_zero_zw ()

graphene_simd4f_t
graphene_simd4f_zero_zw (const graphene_simd4f_t s);

Creates a new graphene_simd4f_t that contains the same values of the given s vector, except for the Z and W components, which are set to 0.

Parameters

Returns

the new vector

Since: 1.0


graphene_simd4f_merge_w ()

graphene_simd4f_t
graphene_simd4f_merge_w (const graphene_simd4f_t s,
                         float v);

Creates a new graphene_simd4f_t that contains the same values of the given s vector, except for the W component, which is set to v .

Parameters

s

a graphene_simd4f_t

 

v

the new value of the W component

 

Returns

the new vector

Since: 1.0


graphene_simd4f_merge_high ()

graphene_simd4f_t
graphene_simd4f_merge_high (const graphene_simd4f_t a,
                            const graphene_simd4f_t b);

Creates a new graphene_simd4f_t that contains the last two components of the vector a and the last two components of the vector b .

Parameters

Returns

the new vector

Since: 1.0


graphene_simd4f_merge_low ()

graphene_simd4f_t
graphene_simd4f_merge_low (const graphene_simd4f_t a,
                           const graphene_simd4f_t b);

Creates a new graphene_simd4f_t that contains the first two components of the vector a and the first two components of the vector b .

Parameters

Returns

the new vector

Since: 1.0


graphene_simd4f_flip_sign_0101 ()

graphene_simd4f_t
graphene_simd4f_flip_sign_0101 (const graphene_simd4f_t s);

Flips the signs of the second and fourth components of the given vector s .

Parameters

Returns

the new vector, with the changed signs

Since: 1.0


graphene_simd4f_flip_sign_1010 ()

graphene_simd4f_t
graphene_simd4f_flip_sign_1010 (const graphene_simd4f_t s);

Flips the signs of the first and third components of the given vector s .

Parameters

Returns

the new vector, with the changed signs

Since: 1.0


graphene_simd4f_cmp_eq ()

bool
graphene_simd4f_cmp_eq (const graphene_simd4f_t a,
                        const graphene_simd4f_t b);

Checks if the two given graphene_simd4f_t are equal.

Parameters

Returns

true if the values of the vectors are equal

Since: 1.0


graphene_simd4f_cmp_neq ()

bool
graphene_simd4f_cmp_neq (const graphene_simd4f_t a,
                         const graphene_simd4f_t b);

Checks if the two given graphene_simd4f_t are not equal.

Parameters

Returns

true if the values of the vectors are not equal

Since: 1.0


graphene_simd4f_cmp_lt ()

bool
graphene_simd4f_cmp_lt (const graphene_simd4f_t a,
                        const graphene_simd4f_t b);

Compares two graphene_simd4f_t and checks if all components of the vector a are less than the respective components of the vector b .

Parameters

Returns

true if vector a is less than b

Since: 1.2


graphene_simd4f_cmp_le ()

bool
graphene_simd4f_cmp_le (const graphene_simd4f_t a,
                        const graphene_simd4f_t b);

Compares two graphene_simd4f_t and checks if all components of the vector a are less than or equal to the respective components of the vector b .

Parameters

Returns

true if vector a is less than or equal to b

Since: 1.2


graphene_simd4f_cmp_ge ()

bool
graphene_simd4f_cmp_ge (const graphene_simd4f_t a,
                        const graphene_simd4f_t b);

Compares two graphene_simd4f_t and checks if all components of the vector a are greater than or equal to the respective components of the vector b .

Parameters

Returns

true if vector a is greater than or equal to b

Since: 1.0


graphene_simd4f_cmp_gt ()

bool
graphene_simd4f_cmp_gt (const graphene_simd4f_t a,
                        const graphene_simd4f_t b);

Compares two graphene_simd4f_t and checks if all components of the vector a are greater than the respective components of the vector b .

Parameters

Returns

true if vector a is greater than b

Since: 1.0


graphene_simd4f_neg ()

graphene_simd4f_t
graphene_simd4f_neg (const graphene_simd4f_t s);

Negates the values of s .

Parameters

Returns

the negated vector

Since: 1.0


graphene_simd4f_madd ()

graphene_simd4f_t
graphene_simd4f_madd (const graphene_simd4f_t m1,
                      const graphene_simd4f_t m2,
                      const graphene_simd4f_t a);

Adds a to the product of m1 and m2 .

Parameters

Returns

the result vector

Since: 1.0


graphene_simd4f_sum ()

graphene_simd4f_t
graphene_simd4f_sum (const graphene_simd4f_t v);

Sums all components of the given vector.

Parameters

Returns

a vector with all components set to be the sum of the passed graphene_simd4f_t

Since: 1.0


graphene_simd4f_sum_scalar ()

float
graphene_simd4f_sum_scalar (const graphene_simd4f_t v);

Sums all the components of the given vector.

Parameters

Returns

a scalar value with the sum of the components of the given graphene_simd4f_t

Since: 1.0


graphene_simd4f_dot4 ()

graphene_simd4f_t
graphene_simd4f_dot4 (const graphene_simd4f_t a,
                      const graphene_simd4f_t b);

Computes the dot product of all the components of the two given graphene_simd4f_t.

Parameters

Returns

a vector whose components are all set to be the dot product of the components of the two operands

Since: 1.0


graphene_simd4f_dot3 ()

graphene_simd4f_t
graphene_simd4f_dot3 (const graphene_simd4f_t a,
                      const graphene_simd4f_t b);

Computes the dot product of the first three components of the two given graphene_simd4f_t.

Parameters

Returns

a vector whose components are all set to the dot product of the components of the two operands

Since: 1.0


graphene_simd4f_dot3_scalar ()

float
graphene_simd4f_dot3_scalar (const graphene_simd4f_t a,
                             const graphene_simd4f_t b);

Computes the dot product of the first three components of the two given graphene_simd4f_t.

Parameters

Returns

the dot product of the two vectors, as a scalar value.

Since: 1.4


graphene_simd4f_dot2 ()

graphene_simd4f_t
graphene_simd4f_dot2 (const graphene_simd4f_t a,
                      const graphene_simd4f_t b);

Computes the dot product of the first two components of the two given graphene_simd4f_t.

Parameters

Returns

a vector whose components are all set to the dot product of the components of the two operands

Since: 1.0


graphene_simd4f_length4 ()

graphene_simd4f_t
graphene_simd4f_length4 (const graphene_simd4f_t v);

Computes the length of the given graphene_simd4f_t vector, using all four of its components.

Parameters

Returns

the length vector

Since: 1.0


graphene_simd4f_length3 ()

graphene_simd4f_t
graphene_simd4f_length3 (const graphene_simd4f_t v);

Computes the length of the given graphene_simd4f_t vector, using the first three of its components.

Parameters

Returns

the length vector

Since: 1.0


graphene_simd4f_length2 ()

graphene_simd4f_t
graphene_simd4f_length2 (const graphene_simd4f_t v);

Computes the length of the given graphene_simd4f_t vector, using the first two of its components.

Parameters

Returns

the length vector

Since: 1.0


graphene_simd4f_normalize4 ()

graphene_simd4f_t
graphene_simd4f_normalize4 (const graphene_simd4f_t v);

Computes the normalization of the given graphene_simd4f_t vector, using all of its components.

Parameters

Returns

the normalized vector

Since: 1.0


graphene_simd4f_normalize3 ()

graphene_simd4f_t
graphene_simd4f_normalize3 (const graphene_simd4f_t v);

Computes the normalization of the given graphene_simd4f_t vector, using the first three of its components.

Parameters

Returns

the normalized vector

Since: 1.0


graphene_simd4f_normalize2 ()

graphene_simd4f_t
graphene_simd4f_normalize2 (const graphene_simd4f_t v);

Computes the normalization of the given graphene_simd4f_t vector, using the first two of its components.

Parameters

Returns

the normalized vector

Since: 1.0


graphene_simd4f_is_zero4 ()

bool
graphene_simd4f_is_zero4 (const graphene_simd4f_t v);

Checks whether the given graphene_simd4f_t has all its components set to 0.

Parameters

Returns

true if all the vector components are zero

Since: 1.0


graphene_simd4f_is_zero3 ()

bool
graphene_simd4f_is_zero3 (const graphene_simd4f_t v);

Checks whether the given graphene_simd4f_t has the first three of its components set to 0.

Parameters

Returns

true if the vector's components are zero

Since: 1.0


graphene_simd4f_is_zero2 ()

bool
graphene_simd4f_is_zero2 (const graphene_simd4f_t v);

Checks whether the given graphene_simd4f_t has the first two of its components set to 0.

Parameters

Returns

true if the vector's components are zero

Since: 1.0


graphene_simd4f_interpolate ()

graphene_simd4f_t
graphene_simd4f_interpolate (const graphene_simd4f_t a,
                             const graphene_simd4f_t b,
                             float f);

Linearly interpolates all components of the two given graphene_simd4f_t vectors using the given factor f .

Parameters

a

a graphene_simd4f_t

 

b

a graphene_simd4f_t

 

f

the interpolation factor

 

Returns

the intrerpolated vector

Since: 1.0

Types and Values

graphene_simd4f_t

typedef struct _graphene_simd4f_t graphene_simd4f_t;

A vector type containing four floating point values.

The contents of the graphene_simd4f_t type are private and cannot be directly accessed; use the provided API instead.

Since: 1.0

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.