Beispiel #1
0
/**
 * graphene_vec4_init_from_vec2:
 * @v: a #graphene_vec4_t
 * @src: a #graphene_vec2_t
 * @z: the value for the third component of @v
 * @w: the value for the fourth component of @v
 *
 * Initializes a #graphene_vec4_t using the components of a
 * #graphene_vec2_t and the values of @z and @w.
 *
 * Returns: (transfer none): the initialized vector
 *
 * Since: 1.0
 */
graphene_vec4_t *
graphene_vec4_init_from_vec2 (graphene_vec4_t       *v,
                              const graphene_vec2_t *src,
                              float                  z,
                              float                  w)
{
  v->value = graphene_simd4f_merge_low (src->value, graphene_simd4f_init (z, w, 0, 0));

  return v;
}
Beispiel #2
0
/**
 * graphene_simd4f_merge_low:
 * @a: a #graphene_simd4f_t
 * @b: a #graphene_simd4f_t
 *
 * 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.
 *
 * Returns: the new vector
 *
 * Since: 1.0
 */
graphene_simd4f_t
(graphene_simd4f_merge_low) (const graphene_simd4f_t a,
                             const graphene_simd4f_t b)
{
  return graphene_simd4f_merge_low (a, b);
}