Current File : //proc/thread-self/root/kunden/usr/share/gtk-doc/html/graphene/graphene-Vectors.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Vectors: Graphene Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Graphene Reference Manual">
<link rel="up" href="ch01.html" title="Graphene">
<link rel="prev" href="graphene-SIMD-matrix.html" title="SIMD matrix">
<link rel="next" href="graphene-Matrix.html" title="Matrix">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#graphene-Vectors.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="graphene-SIMD-matrix.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="graphene-Matrix.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="graphene-Vectors"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="graphene-Vectors.top_of_page"></a>Vectors</span></h2>
<p>Vectors — Vectors in 2, 3, and 4 dimensions</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="graphene-Vectors.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-alloc" title="graphene_vec2_alloc ()">graphene_vec2_alloc</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-free" title="graphene_vec2_free ()">graphene_vec2_free</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-init" title="graphene_vec2_init ()">graphene_vec2_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-init-from-vec2" title="graphene_vec2_init_from_vec2 ()">graphene_vec2_init_from_vec2</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-init-from-float" title="graphene_vec2_init_from_float ()">graphene_vec2_init_from_float</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-to-float" title="graphene_vec2_to_float ()">graphene_vec2_to_float</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-add" title="graphene_vec2_add ()">graphene_vec2_add</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-subtract" title="graphene_vec2_subtract ()">graphene_vec2_subtract</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-multiply" title="graphene_vec2_multiply ()">graphene_vec2_multiply</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-divide" title="graphene_vec2_divide ()">graphene_vec2_divide</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-dot" title="graphene_vec2_dot ()">graphene_vec2_dot</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-scale" title="graphene_vec2_scale ()">graphene_vec2_scale</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-length" title="graphene_vec2_length ()">graphene_vec2_length</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-normalize" title="graphene_vec2_normalize ()">graphene_vec2_normalize</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-negate" title="graphene_vec2_negate ()">graphene_vec2_negate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">bool</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-equal" title="graphene_vec2_equal ()">graphene_vec2_equal</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">bool</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-near" title="graphene_vec2_near ()">graphene_vec2_near</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-min" title="graphene_vec2_min ()">graphene_vec2_min</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-max" title="graphene_vec2_max ()">graphene_vec2_max</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-interpolate" title="graphene_vec2_interpolate ()">graphene_vec2_interpolate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-get-x" title="graphene_vec2_get_x ()">graphene_vec2_get_x</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-get-y" title="graphene_vec2_get_y ()">graphene_vec2_get_y</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-zero" title="graphene_vec2_zero ()">graphene_vec2_zero</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-one" title="graphene_vec2_one ()">graphene_vec2_one</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-x-axis" title="graphene_vec2_x_axis ()">graphene_vec2_x_axis</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec2-y-axis" title="graphene_vec2_y_axis ()">graphene_vec2_y_axis</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-alloc" title="graphene_vec3_alloc ()">graphene_vec3_alloc</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-free" title="graphene_vec3_free ()">graphene_vec3_free</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-init" title="graphene_vec3_init ()">graphene_vec3_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-init-from-vec3" title="graphene_vec3_init_from_vec3 ()">graphene_vec3_init_from_vec3</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-init-from-float" title="graphene_vec3_init_from_float ()">graphene_vec3_init_from_float</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-to-float" title="graphene_vec3_to_float ()">graphene_vec3_to_float</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-add" title="graphene_vec3_add ()">graphene_vec3_add</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-subtract" title="graphene_vec3_subtract ()">graphene_vec3_subtract</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-multiply" title="graphene_vec3_multiply ()">graphene_vec3_multiply</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-divide" title="graphene_vec3_divide ()">graphene_vec3_divide</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-cross" title="graphene_vec3_cross ()">graphene_vec3_cross</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-dot" title="graphene_vec3_dot ()">graphene_vec3_dot</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-scale" title="graphene_vec3_scale ()">graphene_vec3_scale</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-length" title="graphene_vec3_length ()">graphene_vec3_length</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-normalize" title="graphene_vec3_normalize ()">graphene_vec3_normalize</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-negate" title="graphene_vec3_negate ()">graphene_vec3_negate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">bool</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-equal" title="graphene_vec3_equal ()">graphene_vec3_equal</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">bool</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-near" title="graphene_vec3_near ()">graphene_vec3_near</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-min" title="graphene_vec3_min ()">graphene_vec3_min</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-max" title="graphene_vec3_max ()">graphene_vec3_max</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-interpolate" title="graphene_vec3_interpolate ()">graphene_vec3_interpolate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-get-x" title="graphene_vec3_get_x ()">graphene_vec3_get_x</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-get-y" title="graphene_vec3_get_y ()">graphene_vec3_get_y</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-get-z" title="graphene_vec3_get_z ()">graphene_vec3_get_z</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-get-xy" title="graphene_vec3_get_xy ()">graphene_vec3_get_xy</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-get-xy0" title="graphene_vec3_get_xy0 ()">graphene_vec3_get_xy0</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-get-xyz0" title="graphene_vec3_get_xyz0 ()">graphene_vec3_get_xyz0</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-get-xyz1" title="graphene_vec3_get_xyz1 ()">graphene_vec3_get_xyz1</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-get-xyzw" title="graphene_vec3_get_xyzw ()">graphene_vec3_get_xyzw</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-zero" title="graphene_vec3_zero ()">graphene_vec3_zero</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-one" title="graphene_vec3_one ()">graphene_vec3_one</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-x-axis" title="graphene_vec3_x_axis ()">graphene_vec3_x_axis</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-y-axis" title="graphene_vec3_y_axis ()">graphene_vec3_y_axis</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec3-z-axis" title="graphene_vec3_z_axis ()">graphene_vec3_z_axis</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-alloc" title="graphene_vec4_alloc ()">graphene_vec4_alloc</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-free" title="graphene_vec4_free ()">graphene_vec4_free</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-init" title="graphene_vec4_init ()">graphene_vec4_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-init-from-vec4" title="graphene_vec4_init_from_vec4 ()">graphene_vec4_init_from_vec4</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-init-from-vec3" title="graphene_vec4_init_from_vec3 ()">graphene_vec4_init_from_vec3</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-init-from-vec2" title="graphene_vec4_init_from_vec2 ()">graphene_vec4_init_from_vec2</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-init-from-float" title="graphene_vec4_init_from_float ()">graphene_vec4_init_from_float</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-to-float" title="graphene_vec4_to_float ()">graphene_vec4_to_float</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-add" title="graphene_vec4_add ()">graphene_vec4_add</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-subtract" title="graphene_vec4_subtract ()">graphene_vec4_subtract</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-multiply" title="graphene_vec4_multiply ()">graphene_vec4_multiply</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-divide" title="graphene_vec4_divide ()">graphene_vec4_divide</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-dot" title="graphene_vec4_dot ()">graphene_vec4_dot</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-scale" title="graphene_vec4_scale ()">graphene_vec4_scale</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-length" title="graphene_vec4_length ()">graphene_vec4_length</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-normalize" title="graphene_vec4_normalize ()">graphene_vec4_normalize</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-negate" title="graphene_vec4_negate ()">graphene_vec4_negate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">bool</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-equal" title="graphene_vec4_equal ()">graphene_vec4_equal</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">bool</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-near" title="graphene_vec4_near ()">graphene_vec4_near</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-min" title="graphene_vec4_min ()">graphene_vec4_min</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-max" title="graphene_vec4_max ()">graphene_vec4_max</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-interpolate" title="graphene_vec4_interpolate ()">graphene_vec4_interpolate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-get-x" title="graphene_vec4_get_x ()">graphene_vec4_get_x</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-get-y" title="graphene_vec4_get_y ()">graphene_vec4_get_y</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-get-z" title="graphene_vec4_get_z ()">graphene_vec4_get_z</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">float</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-get-w" title="graphene_vec4_get_w ()">graphene_vec4_get_w</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-get-xy" title="graphene_vec4_get_xy ()">graphene_vec4_get_xy</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-get-xyz" title="graphene_vec4_get_xyz ()">graphene_vec4_get_xyz</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-zero" title="graphene_vec4_zero ()">graphene_vec4_zero</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-one" title="graphene_vec4_one ()">graphene_vec4_one</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-x-axis" title="graphene_vec4_x_axis ()">graphene_vec4_x_axis</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-y-axis" title="graphene_vec4_y_axis ()">graphene_vec4_y_axis</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-z-axis" title="graphene_vec4_z_axis ()">graphene_vec4_z_axis</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="graphene-Vectors.html#graphene-vec4-w-axis" title="graphene_vec4_w_axis ()">graphene_vec4_w_axis</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="graphene-Vectors.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="graphene-Vectors.html#GRAPHENE-VEC2-LEN:CAPS" title="GRAPHENE_VEC2_LEN">GRAPHENE_VEC2_LEN</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t">graphene_vec2_t</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="graphene-Vectors.html#GRAPHENE-VEC3-LEN:CAPS" title="GRAPHENE_VEC3_LEN">GRAPHENE_VEC3_LEN</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t">graphene_vec3_t</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="graphene-Vectors.html#GRAPHENE-VEC4-LEN:CAPS" title="GRAPHENE_VEC4_LEN">GRAPHENE_VEC4_LEN</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t">graphene_vec4_t</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="graphene-Vectors.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <graphene.h>
</pre>
</div>
<div class="refsect1">
<a name="graphene-Vectors.description"></a><h2>Description</h2>
<p>Graphene has three vector types, distinguished by their length:</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><p><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a>, which holds 2 components x and y</p></li>
<li class="listitem"><p><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a>, which holds 3 components x, y, and z</p></li>
<li class="listitem"><p><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a>, which holds 4 components x, y, z, and w</p></li>
</ol></div>
<p>Each vector type should be treated as an opaque data type.</p>
</div>
<div class="refsect1">
<a name="graphene-Vectors.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="graphene-vec2-alloc"></a><h3>graphene_vec2_alloc ()</h3>
<pre class="programlisting"><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
graphene_vec2_alloc (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Allocates a new <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> structure.</p>
<p>The contents of the returned structure are undefined.</p>
<p>Use <a class="link" href="graphene-Vectors.html#graphene-vec2-init" title="graphene_vec2_init ()"><code class="function">graphene_vec2_init()</code></a> to initialize the vector.</p>
<p><span class="annotation">[<acronym title="This symbol is a constructor, not a static method."><span class="acronym">constructor</span></acronym>]</span></p>
<div class="refsect3">
<a name="graphene-vec2-alloc.returns"></a><h4>Returns</h4>
<p>the newly allocated <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a>
structure. Use <a class="link" href="graphene-Vectors.html#graphene-vec2-free" title="graphene_vec2_free ()"><code class="function">graphene_vec2_free()</code></a> to free the resources allocated
by this function. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-free"></a><h3>graphene_vec2_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec2_free (<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v</code></em>);</pre>
<p>Frees the resources allocated by <em class="parameter"><code>v</code></em>
</p>
<div class="refsect3">
<a name="graphene-vec2-free.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-init"></a><h3>graphene_vec2_init ()</h3>
<pre class="programlisting"><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
graphene_vec2_init (<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v</code></em>,
<em class="parameter"><code><span class="type">float</span> x</code></em>,
<em class="parameter"><code><span class="type">float</span> y</code></em>);</pre>
<p>Initializes a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> using the given values.</p>
<p>This function can be called multiple times.</p>
<div class="refsect3">
<a name="graphene-vec2-init.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>the X field of the vector</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>the Y field of the vector</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec2-init.returns"></a><h4>Returns</h4>
<p>the initialized vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-init-from-vec2"></a><h3>graphene_vec2_init_from_vec2 ()</h3>
<pre class="programlisting"><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
graphene_vec2_init_from_vec2 (<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *src</code></em>);</pre>
<p>Copies the contents of <em class="parameter"><code>src</code></em>
into <em class="parameter"><code>v</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec2-init-from-vec2.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec2-init-from-vec2.returns"></a><h4>Returns</h4>
<p>the initialized vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-init-from-float"></a><h3>graphene_vec2_init_from_float ()</h3>
<pre class="programlisting"><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
graphene_vec2_init_from_float (<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v</code></em>,
<em class="parameter"><code>const <span class="type">float</span> *src</code></em>);</pre>
<p>Initializes <em class="parameter"><code>v</code></em>
with the contents of the given array.</p>
<div class="refsect3">
<a name="graphene-vec2-init-from-float.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>an array of floating point values
with at least two elements. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=2]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec2-init-from-float.returns"></a><h4>Returns</h4>
<p>the initialized vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-to-float"></a><h3>graphene_vec2_to_float ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec2_to_float (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v</code></em>,
<em class="parameter"><code><span class="type">float</span> *dest</code></em>);</pre>
<p>Stores the components of <em class="parameter"><code>v</code></em>
into an array.</p>
<div class="refsect3">
<a name="graphene-vec2-to-float.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest</p></td>
<td class="parameter_description"><p>return location
for an array of floating point values with at least 2 elements. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=2]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-add"></a><h3>graphene_vec2_add ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec2_add (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *res</code></em>);</pre>
<p>Adds each component of the two passed vectors and places
each result into the components of <em class="parameter"><code>res</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec2-add.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the result. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-subtract"></a><h3>graphene_vec2_subtract ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec2_subtract (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *res</code></em>);</pre>
<p>Subtracts from each component of the first operand <em class="parameter"><code>a</code></em>
the
corresponding component of the second operand <em class="parameter"><code>b</code></em>
and places
each result into the components of <em class="parameter"><code>res</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec2-subtract.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the result. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-multiply"></a><h3>graphene_vec2_multiply ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec2_multiply (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *res</code></em>);</pre>
<p>Multiplies each component of the two passed vectors and places
each result into the components of <em class="parameter"><code>res</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec2-multiply.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the result. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-divide"></a><h3>graphene_vec2_divide ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec2_divide (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *res</code></em>);</pre>
<p>Divides each component of the first operand <em class="parameter"><code>a</code></em>
by the corresponding
component of the second operand <em class="parameter"><code>b</code></em>
, and places the results into the
vector <em class="parameter"><code>res</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec2-divide.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the result. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-dot"></a><h3>graphene_vec2_dot ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec2_dot (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *b</code></em>);</pre>
<p>Computes the dot product of the two given vectors.</p>
<div class="refsect3">
<a name="graphene-vec2-dot.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec2-dot.returns"></a><h4>Returns</h4>
<p> the dot product of the vectors</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-scale"></a><h3>graphene_vec2_scale ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec2_scale (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v</code></em>,
<em class="parameter"><code><span class="type">float</span> factor</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *res</code></em>);</pre>
<p>Multiplies all components of the given vector with the given scalar <em class="parameter"><code>factor</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec2-scale.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>factor</p></td>
<td class="parameter_description"><p>the scalar factor</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the result vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix04.html#api-index-1.2">1.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-length"></a><h3>graphene_vec2_length ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec2_length (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v</code></em>);</pre>
<p>Computes the length of the given vector.</p>
<div class="refsect3">
<a name="graphene-vec2-length.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec2-length.returns"></a><h4>Returns</h4>
<p> the length of the vector</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-normalize"></a><h3>graphene_vec2_normalize ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec2_normalize (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *res</code></em>);</pre>
<p>Computes the normalized vector for the given vector <em class="parameter"><code>v</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec2-normalize.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the
normalized vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-negate"></a><h3>graphene_vec2_negate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec2_negate (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *res</code></em>);</pre>
<p>Negates the given <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec2-negate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the result vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix04.html#api-index-1.2">1.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-equal"></a><h3>graphene_vec2_equal ()</h3>
<pre class="programlisting"><span class="returnvalue">bool</span>
graphene_vec2_equal (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v1</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v2</code></em>);</pre>
<p>Checks whether the two given <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> are equal.</p>
<div class="refsect3">
<a name="graphene-vec2-equal.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v1</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>v2</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec2-equal.returns"></a><h4>Returns</h4>
<p> <code class="literal">true</code> if the two vectors are equal, and false otherwise</p>
</div>
<p class="since">Since: <a class="link" href="ix04.html#api-index-1.2">1.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-near"></a><h3>graphene_vec2_near ()</h3>
<pre class="programlisting"><span class="returnvalue">bool</span>
graphene_vec2_near (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v1</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v2</code></em>,
<em class="parameter"><code><span class="type">float</span> epsilon</code></em>);</pre>
<p>Compares the two given <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> vectors and checks
whether their values are within the given <em class="parameter"><code>epsilon</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec2-near.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v1</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>v2</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>epsilon</p></td>
<td class="parameter_description"><p>the threshold between the two vectors</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec2-near.returns"></a><h4>Returns</h4>
<p> <code class="literal">true</code> if the two vectors are near each other</p>
</div>
<p class="since">Since: <a class="link" href="ix04.html#api-index-1.2">1.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-min"></a><h3>graphene_vec2_min ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec2_min (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *res</code></em>);</pre>
<p>Compares the two given vectors and places the minimum
values of each component into <em class="parameter"><code>res</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec2-min.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>the resulting vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-max"></a><h3>graphene_vec2_max ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec2_max (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *res</code></em>);</pre>
<p>Compares the two given vectors and places the maximum
values of each component into <em class="parameter"><code>res</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec2-max.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>the resulting vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-interpolate"></a><h3>graphene_vec2_interpolate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec2_interpolate (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v1</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v2</code></em>,
<em class="parameter"><code><span class="type">double</span> factor</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *res</code></em>);</pre>
<p>Linearly interpolates <em class="parameter"><code>v1</code></em>
and <em class="parameter"><code>v2</code></em>
using the given <em class="parameter"><code>factor</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec2-interpolate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v1</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>v2</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>factor</p></td>
<td class="parameter_description"><p>the interpolation factor</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>the interpolated vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix07.html#api-index-1.10">1.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-get-x"></a><h3>graphene_vec2_get_x ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec2_get_x (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v</code></em>);</pre>
<p>Retrieves the X component of the <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec2-get-x.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec2-get-x.returns"></a><h4>Returns</h4>
<p> the value of the X component</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-get-y"></a><h3>graphene_vec2_get_y ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec2_get_y (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *v</code></em>);</pre>
<p>Retrieves the Y component of the <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec2-get-y.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec2-get-y.returns"></a><h4>Returns</h4>
<p> the value of the Y component</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-zero"></a><h3>graphene_vec2_zero ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
graphene_vec2_zero (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Retrieves a constant vector with (0, 0) components.</p>
<div class="refsect3">
<a name="graphene-vec2-zero.returns"></a><h4>Returns</h4>
<p>the zero vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-one"></a><h3>graphene_vec2_one ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
graphene_vec2_one (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Retrieves a constant vector with (1, 1) components.</p>
<div class="refsect3">
<a name="graphene-vec2-one.returns"></a><h4>Returns</h4>
<p>the one vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-x-axis"></a><h3>graphene_vec2_x_axis ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
graphene_vec2_x_axis (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Retrieves a constant vector with (1, 0) components.</p>
<div class="refsect3">
<a name="graphene-vec2-x-axis.returns"></a><h4>Returns</h4>
<p>the X axis vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-y-axis"></a><h3>graphene_vec2_y_axis ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="returnvalue">graphene_vec2_t</span></a> *
graphene_vec2_y_axis (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Retrieves a constant vector with (0, 1) components.</p>
<div class="refsect3">
<a name="graphene-vec2-y-axis.returns"></a><h4>Returns</h4>
<p>the Y axis vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-alloc"></a><h3>graphene_vec3_alloc ()</h3>
<pre class="programlisting"><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
graphene_vec3_alloc (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Allocates a new <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> structure.</p>
<p>The contents of the returned structure are undefined.</p>
<p>Use <a class="link" href="graphene-Vectors.html#graphene-vec3-init" title="graphene_vec3_init ()"><code class="function">graphene_vec3_init()</code></a> to initialize the vector.</p>
<p><span class="annotation">[<acronym title="This symbol is a constructor, not a static method."><span class="acronym">constructor</span></acronym>]</span></p>
<div class="refsect3">
<a name="graphene-vec3-alloc.returns"></a><h4>Returns</h4>
<p>the newly allocated <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a>
structure. Use <a class="link" href="graphene-Vectors.html#graphene-vec3-free" title="graphene_vec3_free ()"><code class="function">graphene_vec3_free()</code></a> to free the resources allocated
by this function. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-free"></a><h3>graphene_vec3_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_free (<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>);</pre>
<p>Frees the resources allocated by <em class="parameter"><code>v</code></em>
</p>
<div class="refsect3">
<a name="graphene-vec3-free.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-init"></a><h3>graphene_vec3_init ()</h3>
<pre class="programlisting"><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
graphene_vec3_init (<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>,
<em class="parameter"><code><span class="type">float</span> x</code></em>,
<em class="parameter"><code><span class="type">float</span> y</code></em>,
<em class="parameter"><code><span class="type">float</span> z</code></em>);</pre>
<p>Initializes a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> using the given values.</p>
<p>This function can be called multiple times.</p>
<div class="refsect3">
<a name="graphene-vec3-init.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>the X field of the vector</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>the Y field of the vector</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>z</p></td>
<td class="parameter_description"><p>the Z field of the vector</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec3-init.returns"></a><h4>Returns</h4>
<p>a pointer to the initialized
vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-init-from-vec3"></a><h3>graphene_vec3_init_from_vec3 ()</h3>
<pre class="programlisting"><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
graphene_vec3_init_from_vec3 (<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *src</code></em>);</pre>
<p>Initializes a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> with the values of another
<a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec3-init-from-vec3.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec3-init-from-vec3.returns"></a><h4>Returns</h4>
<p>the initialized vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-init-from-float"></a><h3>graphene_vec3_init_from_float ()</h3>
<pre class="programlisting"><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
graphene_vec3_init_from_float (<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>,
<em class="parameter"><code>const <span class="type">float</span> *src</code></em>);</pre>
<p>Initializes a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> with the values from an array.</p>
<div class="refsect3">
<a name="graphene-vec3-init-from-float.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>an array of 3 floating point values. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=3]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec3-init-from-float.returns"></a><h4>Returns</h4>
<p>the initialized vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-to-float"></a><h3>graphene_vec3_to_float ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_to_float (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>,
<em class="parameter"><code><span class="type">float</span> *dest</code></em>);</pre>
<p>Copies the components of a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> into the given array.</p>
<div class="refsect3">
<a name="graphene-vec3-to-float.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest</p></td>
<td class="parameter_description"><p>return location for
an array of floating point values. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=3]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-add"></a><h3>graphene_vec3_add ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_add (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *res</code></em>);</pre>
<p>Adds each component of the two given vectors.</p>
<div class="refsect3">
<a name="graphene-vec3-add.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the resulting vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-subtract"></a><h3>graphene_vec3_subtract ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_subtract (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *res</code></em>);</pre>
<p>Subtracts from each component of the first operand <em class="parameter"><code>a</code></em>
the
corresponding component of the second operand <em class="parameter"><code>b</code></em>
and places
each result into the components of <em class="parameter"><code>res</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec3-subtract.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the resulting vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-multiply"></a><h3>graphene_vec3_multiply ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_multiply (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *res</code></em>);</pre>
<p>Multiplies each component of the two given vectors.</p>
<div class="refsect3">
<a name="graphene-vec3-multiply.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the resulting vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-divide"></a><h3>graphene_vec3_divide ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_divide (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *res</code></em>);</pre>
<p>Divides each component of the first operand <em class="parameter"><code>a</code></em>
by the corresponding
component of the second operand <em class="parameter"><code>b</code></em>
, and places the results into the
vector <em class="parameter"><code>res</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec3-divide.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the resulting vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-cross"></a><h3>graphene_vec3_cross ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_cross (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *res</code></em>);</pre>
<p>Computes the cross product of the two given vectors.</p>
<div class="refsect3">
<a name="graphene-vec3-cross.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the resulting vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-dot"></a><h3>graphene_vec3_dot ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec3_dot (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *b</code></em>);</pre>
<p>Computes the dot product of the two given vectors.</p>
<div class="refsect3">
<a name="graphene-vec3-dot.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec3-dot.returns"></a><h4>Returns</h4>
<p> the value of the dot product</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-scale"></a><h3>graphene_vec3_scale ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_scale (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>,
<em class="parameter"><code><span class="type">float</span> factor</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *res</code></em>);</pre>
<p>Multiplies all components of the given vector with the given scalar <em class="parameter"><code>factor</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec3-scale.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>factor</p></td>
<td class="parameter_description"><p>the scalar factor</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the result vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix04.html#api-index-1.2">1.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-length"></a><h3>graphene_vec3_length ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec3_length (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>);</pre>
<p>Retrieves the length of the given vector <em class="parameter"><code>v</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec3-length.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec3-length.returns"></a><h4>Returns</h4>
<p> the value of the length of the vector</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-normalize"></a><h3>graphene_vec3_normalize ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_normalize (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *res</code></em>);</pre>
<p>Normalizes the given <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec3-normalize.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the normalized vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-negate"></a><h3>graphene_vec3_negate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_negate (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *res</code></em>);</pre>
<p>Negates the given <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec3-negate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the result vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix04.html#api-index-1.2">1.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-equal"></a><h3>graphene_vec3_equal ()</h3>
<pre class="programlisting"><span class="returnvalue">bool</span>
graphene_vec3_equal (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v1</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v2</code></em>);</pre>
<p>Checks whether the two given <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> are equal.</p>
<div class="refsect3">
<a name="graphene-vec3-equal.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v1</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>v2</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec3-equal.returns"></a><h4>Returns</h4>
<p> <code class="literal">true</code> if the two vectors are equal, and false otherwise</p>
</div>
<p class="since">Since: <a class="link" href="ix04.html#api-index-1.2">1.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-near"></a><h3>graphene_vec3_near ()</h3>
<pre class="programlisting"><span class="returnvalue">bool</span>
graphene_vec3_near (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v1</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v2</code></em>,
<em class="parameter"><code><span class="type">float</span> epsilon</code></em>);</pre>
<p>Compares the two given <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> vectors and checks
whether their values are within the given <em class="parameter"><code>epsilon</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec3-near.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v1</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>v2</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>epsilon</p></td>
<td class="parameter_description"><p>the threshold between the two vectors</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec3-near.returns"></a><h4>Returns</h4>
<p> <code class="literal">true</code> if the two vectors are near each other</p>
</div>
<p class="since">Since: <a class="link" href="ix04.html#api-index-1.2">1.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-min"></a><h3>graphene_vec3_min ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_min (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *res</code></em>);</pre>
<p>Compares each component of the two given vectors and creates a
vector that contains the minimum values.</p>
<div class="refsect3">
<a name="graphene-vec3-min.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the result vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-max"></a><h3>graphene_vec3_max ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_max (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *res</code></em>);</pre>
<p>Compares each component of the two given vectors and creates a
vector that contains the maximum values.</p>
<div class="refsect3">
<a name="graphene-vec3-max.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the result vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-interpolate"></a><h3>graphene_vec3_interpolate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_interpolate (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v1</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v2</code></em>,
<em class="parameter"><code><span class="type">double</span> factor</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *res</code></em>);</pre>
<p>Linearly interpolates <em class="parameter"><code>v1</code></em>
and <em class="parameter"><code>v2</code></em>
using the given <em class="parameter"><code>factor</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec3-interpolate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v1</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>v2</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>factor</p></td>
<td class="parameter_description"><p>the interpolation factor</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>the interpolated vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix07.html#api-index-1.10">1.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-get-x"></a><h3>graphene_vec3_get_x ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec3_get_x (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>);</pre>
<p>Retrieves the first component of the given vector <em class="parameter"><code>v</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec3-get-x.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec3-get-x.returns"></a><h4>Returns</h4>
<p> the value of the first component of the vector</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-get-y"></a><h3>graphene_vec3_get_y ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec3_get_y (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>);</pre>
<p>Retrieves the second component of the given vector <em class="parameter"><code>v</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec3-get-y.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec3-get-y.returns"></a><h4>Returns</h4>
<p> the value of the second component of the vector</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-get-z"></a><h3>graphene_vec3_get_z ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec3_get_z (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>);</pre>
<p>Retrieves the third component of the given vector <em class="parameter"><code>v</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec3-get-z.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec3-get-z.returns"></a><h4>Returns</h4>
<p> the value of the third component of the vector</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-get-xy"></a><h3>graphene_vec3_get_xy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_get_xy (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *res</code></em>);</pre>
<p>Creates a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> that contains the first and second
components of the given <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec3-get-xy.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-get-xy0"></a><h3>graphene_vec3_get_xy0 ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_get_xy0 (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *res</code></em>);</pre>
<p>Creates a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> that contains the first two components of
the given <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a>, and the third component set to 0.</p>
<div class="refsect3">
<a name="graphene-vec3-get-xy0.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-get-xyz0"></a><h3>graphene_vec3_get_xyz0 ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_get_xyz0 (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *res</code></em>);</pre>
<p>Converts a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> in a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> using 0.0
as the value for the fourth component of the resulting vector.</p>
<div class="refsect3">
<a name="graphene-vec3-get-xyz0.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-get-xyz1"></a><h3>graphene_vec3_get_xyz1 ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_get_xyz1 (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *res</code></em>);</pre>
<p>Converts a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> in a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> using 1.0
as the value for the fourth component of the resulting vector.</p>
<div class="refsect3">
<a name="graphene-vec3-get-xyz1.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-get-xyzw"></a><h3>graphene_vec3_get_xyzw ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec3_get_xyzw (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *v</code></em>,
<em class="parameter"><code><span class="type">float</span> w</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *res</code></em>);</pre>
<p>Converts a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> in a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> using <em class="parameter"><code>w</code></em>
as
the value of the fourth component of the resulting vector.</p>
<div class="refsect3">
<a name="graphene-vec3-get-xyzw.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>w</p></td>
<td class="parameter_description"><p>the value of the W component</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-zero"></a><h3>graphene_vec3_zero ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
graphene_vec3_zero (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Provides a constant pointer to a vector with three components,
all sets to 0.</p>
<div class="refsect3">
<a name="graphene-vec3-zero.returns"></a><h4>Returns</h4>
<p>a constant vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-one"></a><h3>graphene_vec3_one ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
graphene_vec3_one (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Provides a constant pointer to a vector with three components,
all sets to 1.</p>
<div class="refsect3">
<a name="graphene-vec3-one.returns"></a><h4>Returns</h4>
<p>a constant vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-x-axis"></a><h3>graphene_vec3_x_axis ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
graphene_vec3_x_axis (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Provides a constant pointer to a vector with three components
with values set to (1, 0, 0).</p>
<div class="refsect3">
<a name="graphene-vec3-x-axis.returns"></a><h4>Returns</h4>
<p>a constant vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-y-axis"></a><h3>graphene_vec3_y_axis ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
graphene_vec3_y_axis (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Provides a constant pointer to a vector with three components
with values set to (0, 1, 0).</p>
<div class="refsect3">
<a name="graphene-vec3-y-axis.returns"></a><h4>Returns</h4>
<p>a constant vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-z-axis"></a><h3>graphene_vec3_z_axis ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="returnvalue">graphene_vec3_t</span></a> *
graphene_vec3_z_axis (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Provides a constant pointer to a vector with three components
with values set to (0, 0, 1).</p>
<div class="refsect3">
<a name="graphene-vec3-z-axis.returns"></a><h4>Returns</h4>
<p>a constant vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-alloc"></a><h3>graphene_vec4_alloc ()</h3>
<pre class="programlisting"><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
graphene_vec4_alloc (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Allocates a new <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> structure.</p>
<p>The contents of the returned structure are undefined.</p>
<p>Use <a class="link" href="graphene-Vectors.html#graphene-vec4-init" title="graphene_vec4_init ()"><code class="function">graphene_vec4_init()</code></a> to initialize the vector.</p>
<p><span class="annotation">[<acronym title="This symbol is a constructor, not a static method."><span class="acronym">constructor</span></acronym>]</span></p>
<div class="refsect3">
<a name="graphene-vec4-alloc.returns"></a><h4>Returns</h4>
<p>the newly allocated <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a>
structure. Use <a class="link" href="graphene-Vectors.html#graphene-vec4-free" title="graphene_vec4_free ()"><code class="function">graphene_vec4_free()</code></a> to free the resources allocated
by this function. </p>
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-free"></a><h3>graphene_vec4_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec4_free (<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>);</pre>
<p>Frees the resources allocated by <em class="parameter"><code>v</code></em>
</p>
<div class="refsect3">
<a name="graphene-vec4-free.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-init"></a><h3>graphene_vec4_init ()</h3>
<pre class="programlisting"><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
graphene_vec4_init (<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>,
<em class="parameter"><code><span class="type">float</span> x</code></em>,
<em class="parameter"><code><span class="type">float</span> y</code></em>,
<em class="parameter"><code><span class="type">float</span> z</code></em>,
<em class="parameter"><code><span class="type">float</span> w</code></em>);</pre>
<p>Initializes a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> using the given values.</p>
<p>This function can be called multiple times.</p>
<div class="refsect3">
<a name="graphene-vec4-init.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>x</p></td>
<td class="parameter_description"><p>the X field of the vector</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>y</p></td>
<td class="parameter_description"><p>the Y field of the vector</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>z</p></td>
<td class="parameter_description"><p>the Z field of the vector</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>w</p></td>
<td class="parameter_description"><p>the W field of the vector</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec4-init.returns"></a><h4>Returns</h4>
<p>a pointer to the initialized
vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-init-from-vec4"></a><h3>graphene_vec4_init_from_vec4 ()</h3>
<pre class="programlisting"><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
graphene_vec4_init_from_vec4 (<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *src</code></em>);</pre>
<p>Initializes a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> using the components of
another <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec4-init-from-vec4.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec4-init-from-vec4.returns"></a><h4>Returns</h4>
<p>the initialized vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-init-from-vec3"></a><h3>graphene_vec4_init_from_vec3 ()</h3>
<pre class="programlisting"><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
graphene_vec4_init_from_vec3 (<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *src</code></em>,
<em class="parameter"><code><span class="type">float</span> w</code></em>);</pre>
<p>Initializes a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> using the components of a
<a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> and the value of <em class="parameter"><code>w</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec4-init-from-vec3.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>w</p></td>
<td class="parameter_description"><p>the value for the fourth component of <em class="parameter"><code>v</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec4-init-from-vec3.returns"></a><h4>Returns</h4>
<p>the initialized vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-init-from-vec2"></a><h3>graphene_vec4_init_from_vec2 ()</h3>
<pre class="programlisting"><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
graphene_vec4_init_from_vec2 (<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *src</code></em>,
<em class="parameter"><code><span class="type">float</span> z</code></em>,
<em class="parameter"><code><span class="type">float</span> w</code></em>);</pre>
<p>Initializes a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> using the components of a
<a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> and the values of <em class="parameter"><code>z</code></em>
and <em class="parameter"><code>w</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec4-init-from-vec2.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>z</p></td>
<td class="parameter_description"><p>the value for the third component of <em class="parameter"><code>v</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>w</p></td>
<td class="parameter_description"><p>the value for the fourth component of <em class="parameter"><code>v</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec4-init-from-vec2.returns"></a><h4>Returns</h4>
<p>the initialized vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-init-from-float"></a><h3>graphene_vec4_init_from_float ()</h3>
<pre class="programlisting"><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
graphene_vec4_init_from_float (<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>,
<em class="parameter"><code>const <span class="type">float</span> *src</code></em>);</pre>
<p>Initializes a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> with the values inside the given array.</p>
<div class="refsect3">
<a name="graphene-vec4-init-from-float.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>an array of four floating point values. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=4]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec4-init-from-float.returns"></a><h4>Returns</h4>
<p>the initialized vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-to-float"></a><h3>graphene_vec4_to_float ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec4_to_float (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>,
<em class="parameter"><code><span class="type">float</span> *dest</code></em>);</pre>
<p>Stores the components of the given <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> into an array
of floating point values.</p>
<div class="refsect3">
<a name="graphene-vec4-to-float.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest</p></td>
<td class="parameter_description"><p>return location for
an array of floating point values. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=4]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-add"></a><h3>graphene_vec4_add ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec4_add (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *res</code></em>);</pre>
<p>Adds each component of the two given vectors.</p>
<div class="refsect3">
<a name="graphene-vec4-add.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the resulting vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-subtract"></a><h3>graphene_vec4_subtract ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec4_subtract (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *res</code></em>);</pre>
<p>Subtracts from each component of the first operand <em class="parameter"><code>a</code></em>
the
corresponding component of the second operand <em class="parameter"><code>b</code></em>
and places
each result into the components of <em class="parameter"><code>res</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec4-subtract.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the resulting vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-multiply"></a><h3>graphene_vec4_multiply ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec4_multiply (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *res</code></em>);</pre>
<p>Multiplies each component of the two given vectors.</p>
<div class="refsect3">
<a name="graphene-vec4-multiply.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the resulting vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-divide"></a><h3>graphene_vec4_divide ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec4_divide (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *res</code></em>);</pre>
<p>Divides each component of the first operand <em class="parameter"><code>a</code></em>
by the corresponding
component of the second operand <em class="parameter"><code>b</code></em>
, and places the results into the
vector <em class="parameter"><code>res</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec4-divide.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the resulting vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-dot"></a><h3>graphene_vec4_dot ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec4_dot (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *b</code></em>);</pre>
<p>Computes the dot product of the two given vectors.</p>
<div class="refsect3">
<a name="graphene-vec4-dot.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec4-dot.returns"></a><h4>Returns</h4>
<p> the value of the dot product</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-scale"></a><h3>graphene_vec4_scale ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec4_scale (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>,
<em class="parameter"><code><span class="type">float</span> factor</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *res</code></em>);</pre>
<p>Multiplies all components of the given vector with the given scalar <em class="parameter"><code>factor</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec4-scale.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>factor</p></td>
<td class="parameter_description"><p>the scalar factor</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the result vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix04.html#api-index-1.2">1.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-length"></a><h3>graphene_vec4_length ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec4_length (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>);</pre>
<p>Computes the length of the given <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec4-length.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec4-length.returns"></a><h4>Returns</h4>
<p> the length of the vector</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-normalize"></a><h3>graphene_vec4_normalize ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec4_normalize (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *res</code></em>);</pre>
<p>Normalizes the given <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec4-normalize.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the normalized
vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-negate"></a><h3>graphene_vec4_negate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec4_negate (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *res</code></em>);</pre>
<p>Negates the given <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec4-negate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the result vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix04.html#api-index-1.2">1.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-equal"></a><h3>graphene_vec4_equal ()</h3>
<pre class="programlisting"><span class="returnvalue">bool</span>
graphene_vec4_equal (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v1</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v2</code></em>);</pre>
<p>Checks whether the two given <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> are equal.</p>
<div class="refsect3">
<a name="graphene-vec4-equal.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v1</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>v2</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec4-equal.returns"></a><h4>Returns</h4>
<p> <code class="literal">true</code> if the two vectors are equal, and false otherwise</p>
</div>
<p class="since">Since: <a class="link" href="ix04.html#api-index-1.2">1.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-near"></a><h3>graphene_vec4_near ()</h3>
<pre class="programlisting"><span class="returnvalue">bool</span>
graphene_vec4_near (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v1</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v2</code></em>,
<em class="parameter"><code><span class="type">float</span> epsilon</code></em>);</pre>
<p>Compares the two given <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> vectors and checks
whether their values are within the given <em class="parameter"><code>epsilon</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec4-near.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v1</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>v2</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>epsilon</p></td>
<td class="parameter_description"><p>the threshold between the two vectors</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec4-near.returns"></a><h4>Returns</h4>
<p> <code class="literal">true</code> if the two vectors are near each other</p>
</div>
<p class="since">Since: <a class="link" href="ix04.html#api-index-1.2">1.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-min"></a><h3>graphene_vec4_min ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec4_min (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *res</code></em>);</pre>
<p>Compares each component of the two given vectors and creates a
vector that contains the minimum values.</p>
<div class="refsect3">
<a name="graphene-vec4-min.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the result vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-max"></a><h3>graphene_vec4_max ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec4_max (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *a</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *b</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *res</code></em>);</pre>
<p>Compares each component of the two given vectors and creates a
vector that contains the maximum values.</p>
<div class="refsect3">
<a name="graphene-vec4-max.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>b</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for the result vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-interpolate"></a><h3>graphene_vec4_interpolate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec4_interpolate (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v1</code></em>,
<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v2</code></em>,
<em class="parameter"><code><span class="type">double</span> factor</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *res</code></em>);</pre>
<p>Linearly interpolates <em class="parameter"><code>v1</code></em>
and <em class="parameter"><code>v2</code></em>
using the given <em class="parameter"><code>factor</code></em>
.</p>
<div class="refsect3">
<a name="graphene-vec4-interpolate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v1</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>v2</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>factor</p></td>
<td class="parameter_description"><p>the interpolation factor</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>the interpolated vector. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix07.html#api-index-1.10">1.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-get-x"></a><h3>graphene_vec4_get_x ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec4_get_x (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>);</pre>
<p>Retrieves the value of the first component of the given <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec4-get-x.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec4-get-x.returns"></a><h4>Returns</h4>
<p> the value of the first component</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-get-y"></a><h3>graphene_vec4_get_y ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec4_get_y (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>);</pre>
<p>Retrieves the value of the second component of the given <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec4-get-y.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec4-get-y.returns"></a><h4>Returns</h4>
<p> the value of the second component</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-get-z"></a><h3>graphene_vec4_get_z ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec4_get_z (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>);</pre>
<p>Retrieves the value of the third component of the given <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec4-get-z.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec4-get-z.returns"></a><h4>Returns</h4>
<p> the value of the third component</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-get-w"></a><h3>graphene_vec4_get_w ()</h3>
<pre class="programlisting"><span class="returnvalue">float</span>
graphene_vec4_get_w (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>);</pre>
<p>Retrieves the value of the fourth component of the given <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec4-get-w.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="graphene-vec4-get-w.returns"></a><h4>Returns</h4>
<p> the value of the fourth component</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-get-xy"></a><h3>graphene_vec4_get_xy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec4_get_xy (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> *res</code></em>);</pre>
<p>Creates a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> that contains the first two components
of the given <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec4-get-xy.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-get-xyz"></a><h3>graphene_vec4_get_xyz ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
graphene_vec4_get_xyz (<em class="parameter"><code>const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> *v</code></em>,
<em class="parameter"><code><a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> *res</code></em>);</pre>
<p>Creates a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> that contains the first three components
of the given <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a>.</p>
<div class="refsect3">
<a name="graphene-vec4-get-xyz.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>res</p></td>
<td class="parameter_description"><p>return location for a graphene_vec3_t. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-zero"></a><h3>graphene_vec4_zero ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
graphene_vec4_zero (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Retrieves a pointer to a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> with all its
components set to 0.</p>
<div class="refsect3">
<a name="graphene-vec4-zero.returns"></a><h4>Returns</h4>
<p>a constant vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-one"></a><h3>graphene_vec4_one ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
graphene_vec4_one (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Retrieves a pointer to a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> with all its
components set to 1.</p>
<div class="refsect3">
<a name="graphene-vec4-one.returns"></a><h4>Returns</h4>
<p>a constant vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-x-axis"></a><h3>graphene_vec4_x_axis ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
graphene_vec4_x_axis (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Retrieves a pointer to a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> with its
components set to (1, 0, 0, 0).</p>
<div class="refsect3">
<a name="graphene-vec4-x-axis.returns"></a><h4>Returns</h4>
<p>a constant vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-y-axis"></a><h3>graphene_vec4_y_axis ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
graphene_vec4_y_axis (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Retrieves a pointer to a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> with its
components set to (0, 1, 0, 0).</p>
<div class="refsect3">
<a name="graphene-vec4-y-axis.returns"></a><h4>Returns</h4>
<p>a constant vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-z-axis"></a><h3>graphene_vec4_z_axis ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
graphene_vec4_z_axis (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Retrieves a pointer to a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> with its
components set to (0, 0, 1, 0).</p>
<div class="refsect3">
<a name="graphene-vec4-z-axis.returns"></a><h4>Returns</h4>
<p>a constant vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-w-axis"></a><h3>graphene_vec4_w_axis ()</h3>
<pre class="programlisting">const <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="returnvalue">graphene_vec4_t</span></a> *
graphene_vec4_w_axis (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Retrieves a pointer to a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> with its
components set to (0, 0, 0, 1).</p>
<div class="refsect3">
<a name="graphene-vec4-w-axis.returns"></a><h4>Returns</h4>
<p>a constant vector. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
</div>
<div class="refsect1">
<a name="graphene-Vectors.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GRAPHENE-VEC2-LEN:CAPS"></a><h3>GRAPHENE_VEC2_LEN</h3>
<pre class="programlisting">#define GRAPHENE_VEC2_LEN 2
</pre>
<p>Evaluates to the number of components of a <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a>.</p>
<p>This symbol is useful when declaring a C array of floating
point values to be used with <a class="link" href="graphene-Vectors.html#graphene-vec2-init-from-float" title="graphene_vec2_init_from_float ()"><code class="function">graphene_vec2_init_from_float()</code></a> and
<a class="link" href="graphene-Vectors.html#graphene-vec2-to-float" title="graphene_vec2_to_float ()"><code class="function">graphene_vec2_to_float()</code></a>, e.g.</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="kt">float</span> <span class="n">v</span><span class="p">[</span><span class="n">GRAPHENE_VEC2_LEN</span><span class="p">];</span>
<span class="c1">// vec is defined elsewhere</span>
<span class="n">graphene_vec2_to_float</span> <span class="p">(</span><span class="o">&</span><span class="n">vec</span><span class="p">,</span> <span class="n">v</span><span class="p">);</span>
<span class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o"><</span> <span class="n">GRAPHENE_VEC2_LEN</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span>
<span class="n">fprintf</span> <span class="p">(</span><span class="n">stdout</span><span class="p">,</span> <span class="s">"component %d: %g</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">i</span><span class="p">,</span> <span class="n">v</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec2-t"></a><h3>graphene_vec2_t</h3>
<pre class="programlisting">typedef struct {
} graphene_vec2_t;
</pre>
<p>A structure capable of holding a vector with two dimensions, x and y.</p>
<p>The contents of the <a class="link" href="graphene-Vectors.html#graphene-vec2-t" title="graphene_vec2_t"><span class="type">graphene_vec2_t</span></a> structure are private and should
never be accessed directly.</p>
</div>
<hr>
<div class="refsect2">
<a name="GRAPHENE-VEC3-LEN:CAPS"></a><h3>GRAPHENE_VEC3_LEN</h3>
<pre class="programlisting">#define GRAPHENE_VEC3_LEN 3
</pre>
<p>Evaluates to the number of components of a <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a>.</p>
<p>This symbol is useful when declaring a C array of floating
point values to be used with <a class="link" href="graphene-Vectors.html#graphene-vec3-init-from-float" title="graphene_vec3_init_from_float ()"><code class="function">graphene_vec3_init_from_float()</code></a> and
<a class="link" href="graphene-Vectors.html#graphene-vec3-to-float" title="graphene_vec3_to_float ()"><code class="function">graphene_vec3_to_float()</code></a>, e.g.</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="kt">float</span> <span class="n">v</span><span class="p">[</span><span class="n">GRAPHENE_VEC3_LEN</span><span class="p">];</span>
<span class="c1">// vec is defined elsewhere</span>
<span class="n">graphene_vec3_to_float</span> <span class="p">(</span><span class="o">&</span><span class="n">vec</span><span class="p">,</span> <span class="n">v</span><span class="p">);</span>
<span class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o"><</span> <span class="n">GRAPHENE_VEC2_LEN</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span>
<span class="n">fprintf</span> <span class="p">(</span><span class="n">stdout</span><span class="p">,</span> <span class="s">"component %d: %g</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">i</span><span class="p">,</span> <span class="n">v</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec3-t"></a><h3>graphene_vec3_t</h3>
<pre class="programlisting">typedef struct {
} graphene_vec3_t;
</pre>
<p>A structure capable of holding a vector with three dimensions: x, y, and z.</p>
<p>The contents of the <a class="link" href="graphene-Vectors.html#graphene-vec3-t" title="graphene_vec3_t"><span class="type">graphene_vec3_t</span></a> structure are private and should
never be accessed directly.</p>
</div>
<hr>
<div class="refsect2">
<a name="GRAPHENE-VEC4-LEN:CAPS"></a><h3>GRAPHENE_VEC4_LEN</h3>
<pre class="programlisting">#define GRAPHENE_VEC4_LEN 4
</pre>
<p>Evaluates to the number of components of a <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a>.</p>
<p>This symbol is useful when declaring a C array of floating
point values to be used with <a class="link" href="graphene-Vectors.html#graphene-vec4-init-from-float" title="graphene_vec4_init_from_float ()"><code class="function">graphene_vec4_init_from_float()</code></a> and
<a class="link" href="graphene-Vectors.html#graphene-vec4-to-float" title="graphene_vec4_to_float ()"><code class="function">graphene_vec4_to_float()</code></a>, e.g.</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="kt">float</span> <span class="n">v</span><span class="p">[</span><span class="n">GRAPHENE_VEC4_LEN</span><span class="p">];</span>
<span class="c1">// vec is defined elsewhere</span>
<span class="n">graphene_vec4_to_float</span> <span class="p">(</span><span class="o">&</span><span class="n">vec</span><span class="p">,</span> <span class="n">v</span><span class="p">);</span>
<span class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o"><</span> <span class="n">GRAPHENE_VEC4_LEN</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span>
<span class="n">fprintf</span> <span class="p">(</span><span class="n">stdout</span><span class="p">,</span> <span class="s">"component %d: %g</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">i</span><span class="p">,</span> <span class="n">v</span><span class="p">[</span><span class="n">i</span><span class="p">]);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.0">1.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="graphene-vec4-t"></a><h3>graphene_vec4_t</h3>
<pre class="programlisting">typedef struct {
} graphene_vec4_t;
</pre>
<p>A structure capable of holding a vector with four dimensions: x, y, z, and w.</p>
<p>The contents of the <a class="link" href="graphene-Vectors.html#graphene-vec4-t" title="graphene_vec4_t"><span class="type">graphene_vec4_t</span></a> structure are private and should
never be accessed directly.</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>