~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to devel-docs/libgimpmath/html/libgimpmath-GimpVector.html

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
1
2
<html>
2
3
<head>
3
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4
5
<title>GimpVector</title>
5
 
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
6
7
<link rel="start" href="index.html" title="GIMP Math Library Reference Manual">
7
8
<link rel="up" href="libgimpmath.html" title="Part&#160;I.&#160;GIMP Math Library">
8
9
<link rel="prev" href="libgimpmath-GimpMatrix.html" title="GimpMatrix">
9
10
<link rel="next" href="libgimpmath-GimpMD5.html" title="GimpMD5">
10
 
<meta name="generator" content="GTK-Doc V1.4 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
11
12
<link rel="stylesheet" href="style.css" type="text/css">
12
13
<link rel="part" href="libgimpmath.html" title="Part&#160;I.&#160;GIMP Math Library">
 
14
<link rel="index" href="libgimpmath-index.html" title="Index">
 
15
<link rel="index" href="libgimpmath-index-new-in-2-2.html" title="Index of new symbols in GIMP 2.2">
 
16
<link rel="index" href="libgimpmath-index-new-in-2-4.html" title="Index of new symbols in GIMP 2.4">
 
17
<link rel="index" href="libgimpmath-index-deprecated.html" title="Index of deprecated symbols">
13
18
</head>
14
19
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
 
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
 
20
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
21
<tr valign="middle">
16
22
<td><a accesskey="p" href="libgimpmath-GimpMatrix.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17
23
<td><a accesskey="u" href="libgimpmath.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
18
24
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
19
25
<th width="100%" align="center">GIMP Math Library Reference Manual</th>
20
26
<td><a accesskey="n" href="libgimpmath-GimpMD5.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
21
 
</tr></table>
 
27
</tr>
 
28
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2587544" class="shortcut">Top</a>
 
29
                  &#160;|&#160;
 
30
                  <a href="#id2607476" class="shortcut">Description</a></nobr></td></tr>
 
31
</table>
22
32
<div class="refentry" lang="en">
23
33
<a name="libgimpmath-GimpVector"></a><div class="titlepage"></div>
24
34
<div class="refnamediv"><table width="100%"><tr>
25
35
<td valign="top">
26
 
<h2><span class="refentrytitle">GimpVector</span></h2>
 
36
<h2>
 
37
<a name="id2587544"></a><span class="refentrytitle">GimpVector</span>
 
38
</h2>
27
39
<p>GimpVector &#8212; Utilities to set up and manipulate vectors.</p>
28
40
</td>
29
41
<td valign="top" align="right"></td>
34
46
 
35
47
 
36
48
 
37
 
            <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>;
38
 
            <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>;
39
 
            <a href="libgimpmath-GimpVector.html#GimpVector4">GimpVector4</a>;
40
 
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> <a href="libgimpmath-GimpVector.html#gimp-vector2-new">gimp_vector2_new</a>                (gdouble x,
41
 
                                             gdouble y);
42
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector2-set">gimp_vector2_set</a>                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector,
43
 
                                             gdouble x,
44
 
                                             gdouble y);
45
 
gdouble     <a href="libgimpmath-GimpVector.html#gimp-vector2-length">gimp_vector2_length</a>             (const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector);
46
 
gdouble     <a href="libgimpmath-GimpVector.html#gimp-vector2-length-val">gimp_vector2_length_val</a>         (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector);
47
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector2-mul">gimp_vector2_mul</a>                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector,
48
 
                                             gdouble factor);
49
 
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> <a href="libgimpmath-GimpVector.html#gimp-vector2-mul-val">gimp_vector2_mul_val</a>            (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector,
50
 
                                             gdouble factor);
51
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector2-normalize">gimp_vector2_normalize</a>          (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector);
52
 
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> <a href="libgimpmath-GimpVector.html#gimp-vector2-normalize-val">gimp_vector2_normalize_val</a>      (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector);
53
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector2-neg">gimp_vector2_neg</a>                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector);
54
 
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> <a href="libgimpmath-GimpVector.html#gimp-vector2-neg-val">gimp_vector2_neg_val</a>            (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector);
55
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector2-add">gimp_vector2_add</a>                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *result,
56
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
57
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);
58
 
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> <a href="libgimpmath-GimpVector.html#gimp-vector2-add-val">gimp_vector2_add_val</a>            (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
59
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);
60
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector2-sub">gimp_vector2_sub</a>                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *result,
61
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
62
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);
63
 
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> <a href="libgimpmath-GimpVector.html#gimp-vector2-sub-val">gimp_vector2_sub_val</a>            (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
64
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);
65
 
gdouble     <a href="libgimpmath-GimpVector.html#gimp-vector2-inner-product">gimp_vector2_inner_product</a>      (const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
66
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);
67
 
gdouble     <a href="libgimpmath-GimpVector.html#gimp-vector2-inner-product-val">gimp_vector2_inner_product_val</a>  (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
68
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);
69
 
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> <a href="libgimpmath-GimpVector.html#gimp-vector2-cross-product">gimp_vector2_cross_product</a>      (const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
70
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);
71
 
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> <a href="libgimpmath-GimpVector.html#gimp-vector2-cross-product-val">gimp_vector2_cross_product_val</a>  (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
72
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);
73
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector2-rotate">gimp_vector2_rotate</a>             (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector,
74
 
                                             gdouble alpha);
75
 
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> <a href="libgimpmath-GimpVector.html#gimp-vector2-rotate-val">gimp_vector2_rotate_val</a>         (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector,
76
 
                                             gdouble alpha);
77
 
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> <a href="libgimpmath-GimpVector.html#gimp-vector3-new">gimp_vector3_new</a>                (gdouble x,
78
 
                                             gdouble y,
79
 
                                             gdouble z);
80
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector3-set">gimp_vector3_set</a>                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector,
81
 
                                             gdouble x,
82
 
                                             gdouble y,
83
 
                                             gdouble z);
84
 
gdouble     <a href="libgimpmath-GimpVector.html#gimp-vector3-length">gimp_vector3_length</a>             (const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector);
85
 
gdouble     <a href="libgimpmath-GimpVector.html#gimp-vector3-length-val">gimp_vector3_length_val</a>         (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector);
86
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector3-mul">gimp_vector3_mul</a>                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector,
87
 
                                             gdouble factor);
88
 
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> <a href="libgimpmath-GimpVector.html#gimp-vector3-mul-val">gimp_vector3_mul_val</a>            (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector,
89
 
                                             gdouble factor);
90
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector3-normalize">gimp_vector3_normalize</a>          (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector);
91
 
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> <a href="libgimpmath-GimpVector.html#gimp-vector3-normalize-val">gimp_vector3_normalize_val</a>      (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector);
92
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector3-neg">gimp_vector3_neg</a>                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector);
93
 
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> <a href="libgimpmath-GimpVector.html#gimp-vector3-neg-val">gimp_vector3_neg_val</a>            (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector);
94
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector3-add">gimp_vector3_add</a>                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *result,
95
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
96
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);
97
 
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> <a href="libgimpmath-GimpVector.html#gimp-vector3-add-val">gimp_vector3_add_val</a>            (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
98
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);
99
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector3-sub">gimp_vector3_sub</a>                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *result,
100
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
101
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);
102
 
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> <a href="libgimpmath-GimpVector.html#gimp-vector3-sub-val">gimp_vector3_sub_val</a>            (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
103
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);
104
 
gdouble     <a href="libgimpmath-GimpVector.html#gimp-vector3-inner-product">gimp_vector3_inner_product</a>      (const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
105
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);
106
 
gdouble     <a href="libgimpmath-GimpVector.html#gimp-vector3-inner-product-val">gimp_vector3_inner_product_val</a>  (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
107
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);
108
 
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> <a href="libgimpmath-GimpVector.html#gimp-vector3-cross-product">gimp_vector3_cross_product</a>      (const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
109
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);
110
 
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> <a href="libgimpmath-GimpVector.html#gimp-vector3-cross-product-val">gimp_vector3_cross_product_val</a>  (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
111
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);
112
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector3-rotate">gimp_vector3_rotate</a>             (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector,
113
 
                                             gdouble alpha,
114
 
                                             gdouble beta,
115
 
                                             gdouble gamma);
116
 
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> <a href="libgimpmath-GimpVector.html#gimp-vector3-rotate-val">gimp_vector3_rotate_val</a>         (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector,
117
 
                                             gdouble alpha,
118
 
                                             gdouble beta,
119
 
                                             gdouble gamma);
120
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector-2d-to-3d">gimp_vector_2d_to_3d</a>            (gint sx,
121
 
                                             gint sy,
122
 
                                             gint w,
123
 
                                             gint h,
124
 
                                             gint x,
125
 
                                             gint y,
126
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vp,
127
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *p);
128
 
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> <a href="libgimpmath-GimpVector.html#gimp-vector-2d-to-3d-val">gimp_vector_2d_to_3d_val</a>        (gint sx,
129
 
                                             gint sy,
130
 
                                             gint w,
131
 
                                             gint h,
132
 
                                             gint x,
133
 
                                             gint y,
134
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vp,
135
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> p);
136
 
void        <a href="libgimpmath-GimpVector.html#gimp-vector-3d-to-2d">gimp_vector_3d_to_2d</a>            (gint sx,
137
 
                                             gint sy,
138
 
                                             gint w,
139
 
                                             gint h,
140
 
                                             gdouble *x,
141
 
                                             gdouble *y,
142
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vp,
143
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *p);
 
49
                    <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>;
 
50
                    <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>;
 
51
                    <a href="libgimpmath-GimpVector.html#GimpVector4">GimpVector4</a>;
 
52
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         <a href="libgimpmath-GimpVector.html#gimp-vector2-new">gimp_vector2_new</a>                    (gdouble x,
 
53
                                                         gdouble y);
 
54
void                <a href="libgimpmath-GimpVector.html#gimp-vector2-set">gimp_vector2_set</a>                    (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector,
 
55
                                                         gdouble x,
 
56
                                                         gdouble y);
 
57
gdouble             <a href="libgimpmath-GimpVector.html#gimp-vector2-length">gimp_vector2_length</a>                 (const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector);
 
58
gdouble             <a href="libgimpmath-GimpVector.html#gimp-vector2-length-val">gimp_vector2_length_val</a>             (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector);
 
59
void                <a href="libgimpmath-GimpVector.html#gimp-vector2-mul">gimp_vector2_mul</a>                    (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector,
 
60
                                                         gdouble factor);
 
61
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         <a href="libgimpmath-GimpVector.html#gimp-vector2-mul-val">gimp_vector2_mul_val</a>                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector,
 
62
                                                         gdouble factor);
 
63
void                <a href="libgimpmath-GimpVector.html#gimp-vector2-normalize">gimp_vector2_normalize</a>              (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector);
 
64
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         <a href="libgimpmath-GimpVector.html#gimp-vector2-normalize-val">gimp_vector2_normalize_val</a>          (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector);
 
65
void                <a href="libgimpmath-GimpVector.html#gimp-vector2-neg">gimp_vector2_neg</a>                    (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector);
 
66
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         <a href="libgimpmath-GimpVector.html#gimp-vector2-neg-val">gimp_vector2_neg_val</a>                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector);
 
67
void                <a href="libgimpmath-GimpVector.html#gimp-vector2-add">gimp_vector2_add</a>                    (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *result,
 
68
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
 
69
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);
 
70
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         <a href="libgimpmath-GimpVector.html#gimp-vector2-add-val">gimp_vector2_add_val</a>                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
 
71
                                                         <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);
 
72
void                <a href="libgimpmath-GimpVector.html#gimp-vector2-sub">gimp_vector2_sub</a>                    (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *result,
 
73
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
 
74
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);
 
75
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         <a href="libgimpmath-GimpVector.html#gimp-vector2-sub-val">gimp_vector2_sub_val</a>                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
 
76
                                                         <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);
 
77
gdouble             <a href="libgimpmath-GimpVector.html#gimp-vector2-inner-product">gimp_vector2_inner_product</a>          (const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
 
78
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);
 
79
gdouble             <a href="libgimpmath-GimpVector.html#gimp-vector2-inner-product-val">gimp_vector2_inner_product_val</a>      (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
 
80
                                                         <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);
 
81
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         <a href="libgimpmath-GimpVector.html#gimp-vector2-cross-product">gimp_vector2_cross_product</a>          (const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
 
82
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);
 
83
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         <a href="libgimpmath-GimpVector.html#gimp-vector2-cross-product-val">gimp_vector2_cross_product_val</a>      (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
 
84
                                                         <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);
 
85
void                <a href="libgimpmath-GimpVector.html#gimp-vector2-rotate">gimp_vector2_rotate</a>                 (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector,
 
86
                                                         gdouble alpha);
 
87
<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         <a href="libgimpmath-GimpVector.html#gimp-vector2-rotate-val">gimp_vector2_rotate_val</a>             (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector,
 
88
                                                         gdouble alpha);
 
89
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         <a href="libgimpmath-GimpVector.html#gimp-vector3-new">gimp_vector3_new</a>                    (gdouble x,
 
90
                                                         gdouble y,
 
91
                                                         gdouble z);
 
92
void                <a href="libgimpmath-GimpVector.html#gimp-vector3-set">gimp_vector3_set</a>                    (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector,
 
93
                                                         gdouble x,
 
94
                                                         gdouble y,
 
95
                                                         gdouble z);
 
96
gdouble             <a href="libgimpmath-GimpVector.html#gimp-vector3-length">gimp_vector3_length</a>                 (const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector);
 
97
gdouble             <a href="libgimpmath-GimpVector.html#gimp-vector3-length-val">gimp_vector3_length_val</a>             (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector);
 
98
void                <a href="libgimpmath-GimpVector.html#gimp-vector3-mul">gimp_vector3_mul</a>                    (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector,
 
99
                                                         gdouble factor);
 
100
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         <a href="libgimpmath-GimpVector.html#gimp-vector3-mul-val">gimp_vector3_mul_val</a>                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector,
 
101
                                                         gdouble factor);
 
102
void                <a href="libgimpmath-GimpVector.html#gimp-vector3-normalize">gimp_vector3_normalize</a>              (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector);
 
103
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         <a href="libgimpmath-GimpVector.html#gimp-vector3-normalize-val">gimp_vector3_normalize_val</a>          (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector);
 
104
void                <a href="libgimpmath-GimpVector.html#gimp-vector3-neg">gimp_vector3_neg</a>                    (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector);
 
105
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         <a href="libgimpmath-GimpVector.html#gimp-vector3-neg-val">gimp_vector3_neg_val</a>                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector);
 
106
void                <a href="libgimpmath-GimpVector.html#gimp-vector3-add">gimp_vector3_add</a>                    (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *result,
 
107
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
 
108
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);
 
109
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         <a href="libgimpmath-GimpVector.html#gimp-vector3-add-val">gimp_vector3_add_val</a>                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
 
110
                                                         <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);
 
111
void                <a href="libgimpmath-GimpVector.html#gimp-vector3-sub">gimp_vector3_sub</a>                    (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *result,
 
112
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
 
113
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);
 
114
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         <a href="libgimpmath-GimpVector.html#gimp-vector3-sub-val">gimp_vector3_sub_val</a>                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
 
115
                                                         <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);
 
116
gdouble             <a href="libgimpmath-GimpVector.html#gimp-vector3-inner-product">gimp_vector3_inner_product</a>          (const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
 
117
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);
 
118
gdouble             <a href="libgimpmath-GimpVector.html#gimp-vector3-inner-product-val">gimp_vector3_inner_product_val</a>      (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
 
119
                                                         <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);
 
120
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         <a href="libgimpmath-GimpVector.html#gimp-vector3-cross-product">gimp_vector3_cross_product</a>          (const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
 
121
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);
 
122
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         <a href="libgimpmath-GimpVector.html#gimp-vector3-cross-product-val">gimp_vector3_cross_product_val</a>      (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
 
123
                                                         <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);
 
124
void                <a href="libgimpmath-GimpVector.html#gimp-vector3-rotate">gimp_vector3_rotate</a>                 (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector,
 
125
                                                         gdouble alpha,
 
126
                                                         gdouble beta,
 
127
                                                         gdouble gamma);
 
128
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         <a href="libgimpmath-GimpVector.html#gimp-vector3-rotate-val">gimp_vector3_rotate_val</a>             (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector,
 
129
                                                         gdouble alpha,
 
130
                                                         gdouble beta,
 
131
                                                         gdouble gamma);
 
132
void                <a href="libgimpmath-GimpVector.html#gimp-vector-2d-to-3d">gimp_vector_2d_to_3d</a>                (gint sx,
 
133
                                                         gint sy,
 
134
                                                         gint w,
 
135
                                                         gint h,
 
136
                                                         gint x,
 
137
                                                         gint y,
 
138
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vp,
 
139
                                                         <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *p);
 
140
<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         <a href="libgimpmath-GimpVector.html#gimp-vector-2d-to-3d-val">gimp_vector_2d_to_3d_val</a>            (gint sx,
 
141
                                                         gint sy,
 
142
                                                         gint w,
 
143
                                                         gint h,
 
144
                                                         gint x,
 
145
                                                         gint y,
 
146
                                                         <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vp,
 
147
                                                         <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> p);
 
148
void                <a href="libgimpmath-GimpVector.html#gimp-vector-3d-to-2d">gimp_vector_3d_to_2d</a>                (gint sx,
 
149
                                                         gint sy,
 
150
                                                         gint w,
 
151
                                                         gint h,
 
152
                                                         gdouble *x,
 
153
                                                         gdouble *y,
 
154
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vp,
 
155
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *p);
144
156
</pre>
145
157
</div>
146
158
<div class="refsect1" lang="en">
147
 
<a name="id2565782"></a><h2>Description</h2>
 
159
<a name="id2607476"></a><h2>Description</h2>
148
160
<p>
149
161
Utilities to set up and manipulate vectors.
150
162
 
151
163
</p>
152
164
</div>
153
165
<div class="refsect1" lang="en">
154
 
<a name="id2565793"></a><h2>Details</h2>
 
166
<a name="id2607493"></a><h2>Details</h2>
155
167
<div class="refsect2" lang="en">
156
 
<a name="id2565800"></a><h3>
 
168
<a name="id2607504"></a><h3>
157
169
<a name="GimpVector2"></a>GimpVector2</h3>
158
 
<a class="indexterm" name="id2565809"></a><pre class="programlisting">typedef struct {
 
170
<a class="indexterm" name="id2607516"></a><pre class="programlisting">typedef struct {
159
171
  gdouble x, y;
160
172
} GimpVector2;
161
173
</pre>
165
177
</div>
166
178
<hr>
167
179
<div class="refsect2" lang="en">
168
 
<a name="id2565825"></a><h3>
 
180
<a name="id2607532"></a><h3>
169
181
<a name="GimpVector3"></a>GimpVector3</h3>
170
 
<a class="indexterm" name="id2565835"></a><pre class="programlisting">typedef struct {
 
182
<a class="indexterm" name="id2607544"></a><pre class="programlisting">typedef struct {
171
183
  gdouble x, y, z;
172
184
} GimpVector3;
173
185
</pre>
177
189
</div>
178
190
<hr>
179
191
<div class="refsect2" lang="en">
180
 
<a name="id2565852"></a><h3>
 
192
<a name="id2607560"></a><h3>
181
193
<a name="GimpVector4"></a>GimpVector4</h3>
182
 
<a class="indexterm" name="id2565861"></a><pre class="programlisting">typedef struct {
 
194
<a class="indexterm" name="id2607572"></a><pre class="programlisting">typedef struct {
183
195
  gdouble x, y, z, w;
184
196
} GimpVector4;
185
197
</pre>
189
201
</div>
190
202
<hr>
191
203
<div class="refsect2" lang="en">
192
 
<a name="id2565878"></a><h3>
 
204
<a name="id2607589"></a><h3>
193
205
<a name="gimp-vector2-new"></a>gimp_vector2_new ()</h3>
194
 
<a class="indexterm" name="id2565888"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> gimp_vector2_new                (gdouble x,
195
 
                                             gdouble y);</pre>
 
206
<a class="indexterm" name="id2607602"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         gimp_vector2_new                    (gdouble x,
 
207
                                                         gdouble y);</pre>
196
208
<p>
197
209
Creates a <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a> of coordinates <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em>.</p>
198
210
<p>
202
214
<col align="left" valign="top">
203
215
<tbody>
204
216
<tr>
205
 
<td>
206
 
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
 
217
<td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
207
218
<td> the X coordinate.
208
219
</td>
209
220
</tr>
210
221
<tr>
211
 
<td>
212
 
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
 
222
<td><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
213
223
<td> the Y coordinate.
214
224
</td>
215
225
</tr>
216
226
<tr>
217
 
<td>
218
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
227
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
219
228
<td> the resulting <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
220
229
</td>
221
230
</tr>
224
233
</div>
225
234
<hr>
226
235
<div class="refsect2" lang="en">
227
 
<a name="id2565996"></a><h3>
 
236
<a name="id2607710"></a><h3>
228
237
<a name="gimp-vector2-set"></a>gimp_vector2_set ()</h3>
229
 
<a class="indexterm" name="id2566006"></a><pre class="programlisting">void        gimp_vector2_set                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector,
230
 
                                             gdouble x,
231
 
                                             gdouble y);</pre>
 
238
<a class="indexterm" name="id2607722"></a><pre class="programlisting">void                gimp_vector2_set                    (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector,
 
239
                                                         gdouble x,
 
240
                                                         gdouble y);</pre>
232
241
<p>
233
242
Sets the X and Y coordinates of <em class="parameter"><code>vector</code></em> to <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em>.</p>
234
243
<p>
238
247
<col align="left" valign="top">
239
248
<tbody>
240
249
<tr>
241
 
<td>
242
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
250
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
243
251
<td> a pointer to a <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
244
252
</td>
245
253
</tr>
246
254
<tr>
247
 
<td>
248
 
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
 
255
<td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
249
256
<td> the X coordinate.
250
257
</td>
251
258
</tr>
252
259
<tr>
253
 
<td>
254
 
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
 
260
<td><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
255
261
<td> the Y coordinate.
256
262
</td>
257
263
</tr>
260
266
</div>
261
267
<hr>
262
268
<div class="refsect2" lang="en">
263
 
<a name="id2566123"></a><h3>
 
269
<a name="id2607840"></a><h3>
264
270
<a name="gimp-vector2-length"></a>gimp_vector2_length ()</h3>
265
 
<a class="indexterm" name="id2566133"></a><pre class="programlisting">gdouble     gimp_vector2_length             (const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector);</pre>
 
271
<a class="indexterm" name="id2607853"></a><pre class="programlisting">gdouble             gimp_vector2_length                 (const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector);</pre>
266
272
<p>
267
273
Computes the length of a 2D vector.</p>
268
274
<p>
272
278
<col align="left" valign="top">
273
279
<tbody>
274
280
<tr>
275
 
<td>
276
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
281
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
277
282
<td> a pointer to a <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
278
283
</td>
279
284
</tr>
280
285
<tr>
281
 
<td>
282
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
286
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
283
287
<td> the length of <em class="parameter"><code>vector</code></em> (a positive gdouble).
284
288
</td>
285
289
</tr>
288
292
</div>
289
293
<hr>
290
294
<div class="refsect2" lang="en">
291
 
<a name="id2566180"></a><h3>
 
295
<a name="id2557204"></a><h3>
292
296
<a name="gimp-vector2-length-val"></a>gimp_vector2_length_val ()</h3>
293
 
<a class="indexterm" name="id2566188"></a><pre class="programlisting">gdouble     gimp_vector2_length_val         (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector);</pre>
 
297
<a class="indexterm" name="id2597164"></a><pre class="programlisting">gdouble             gimp_vector2_length_val             (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector);</pre>
294
298
<p>
295
299
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector2-length"><code class="function">gimp_vector2_length()</code></a> but the
296
300
vector is passed by value rather than by reference.</p>
301
305
<col align="left" valign="top">
302
306
<tbody>
303
307
<tr>
304
 
<td>
305
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
308
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
306
309
<td> a <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
307
310
</td>
308
311
</tr>
309
312
<tr>
310
 
<td>
311
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
313
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
312
314
<td> the length of <em class="parameter"><code>vector</code></em> (a positive gdouble).
313
315
</td>
314
316
</tr>
317
319
</div>
318
320
<hr>
319
321
<div class="refsect2" lang="en">
320
 
<a name="id2566262"></a><h3>
 
322
<a name="id2607991"></a><h3>
321
323
<a name="gimp-vector2-mul"></a>gimp_vector2_mul ()</h3>
322
 
<a class="indexterm" name="id2566270"></a><pre class="programlisting">void        gimp_vector2_mul                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector,
323
 
                                             gdouble factor);</pre>
 
324
<a class="indexterm" name="id2608002"></a><pre class="programlisting">void                gimp_vector2_mul                    (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector,
 
325
                                                         gdouble factor);</pre>
324
326
<p>
325
327
Multiplies each component of the <em class="parameter"><code>vector</code></em> by <em class="parameter"><code>factor</code></em>. Note that this
326
328
is equivalent to multiplying the vectors length by <em class="parameter"><code>factor</code></em>.</p>
331
333
<col align="left" valign="top">
332
334
<tbody>
333
335
<tr>
334
 
<td>
335
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
336
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
336
337
<td> a pointer to a <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
337
338
</td>
338
339
</tr>
339
340
<tr>
340
 
<td>
341
 
<span class="term"><em class="parameter"><code>factor</code></em>&#160;:</span></td>
 
341
<td><span class="term"><em class="parameter"><code>factor</code></em>&#160;:</span></td>
342
342
<td> a scalar.
343
343
</td>
344
344
</tr>
347
347
</div>
348
348
<hr>
349
349
<div class="refsect2" lang="en">
350
 
<a name="id2566357"></a><h3>
 
350
<a name="id2608088"></a><h3>
351
351
<a name="gimp-vector2-mul-val"></a>gimp_vector2_mul_val ()</h3>
352
 
<a class="indexterm" name="id2566365"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> gimp_vector2_mul_val            (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector,
353
 
                                             gdouble factor);</pre>
 
352
<a class="indexterm" name="id2608099"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         gimp_vector2_mul_val                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector,
 
353
                                                         gdouble factor);</pre>
354
354
<p>
355
355
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector2-mul"><code class="function">gimp_vector2_mul()</code></a> but the vector is
356
356
passed by value rather than by reference.</p>
361
361
<col align="left" valign="top">
362
362
<tbody>
363
363
<tr>
364
 
<td>
365
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
364
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
366
365
<td> a <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
367
366
</td>
368
367
</tr>
369
368
<tr>
370
 
<td>
371
 
<span class="term"><em class="parameter"><code>factor</code></em>&#160;:</span></td>
 
369
<td><span class="term"><em class="parameter"><code>factor</code></em>&#160;:</span></td>
372
370
<td> a scalar.
373
371
</td>
374
372
</tr>
375
373
<tr>
376
 
<td>
377
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
374
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
378
375
<td> the resulting <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
379
376
</td>
380
377
</tr>
383
380
</div>
384
381
<hr>
385
382
<div class="refsect2" lang="en">
386
 
<a name="id2566460"></a><h3>
 
383
<a name="id2608194"></a><h3>
387
384
<a name="gimp-vector2-normalize"></a>gimp_vector2_normalize ()</h3>
388
 
<a class="indexterm" name="id2566468"></a><pre class="programlisting">void        gimp_vector2_normalize          (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector);</pre>
 
385
<a class="indexterm" name="id2608204"></a><pre class="programlisting">void                gimp_vector2_normalize              (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector);</pre>
389
386
<p>
390
387
Normalizes the <em class="parameter"><code>vector</code></em> so the length of the <em class="parameter"><code>vector</code></em> is 1.0. The nul
391
388
vector will not be changed.</p>
395
392
<div class="variablelist"><table border="0">
396
393
<col align="left" valign="top">
397
394
<tbody><tr>
398
 
<td>
399
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
395
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
400
396
<td> a pointer to a <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
401
397
</td>
402
398
</tr></tbody>
404
400
</div>
405
401
<hr>
406
402
<div class="refsect2" lang="en">
407
 
<a name="id2566530"></a><h3>
 
403
<a name="id2608266"></a><h3>
408
404
<a name="gimp-vector2-normalize-val"></a>gimp_vector2_normalize_val ()</h3>
409
 
<a class="indexterm" name="id2566539"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> gimp_vector2_normalize_val      (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector);</pre>
 
405
<a class="indexterm" name="id2608277"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         gimp_vector2_normalize_val          (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector);</pre>
410
406
<p>
411
407
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector2-normalize"><code class="function">gimp_vector2_normalize()</code></a> but the
412
408
vector is passed by value rather than by reference.</p>
417
413
<col align="left" valign="top">
418
414
<tbody>
419
415
<tr>
420
 
<td>
421
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
416
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
422
417
<td> a <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
423
418
</td>
424
419
</tr>
425
420
<tr>
426
 
<td>
427
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
421
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
428
422
<td> a <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a> parallel to <em class="parameter"><code>vector</code></em>, pointing in the same
429
423
direction but with a length of 1.0.
430
424
</td>
434
428
</div>
435
429
<hr>
436
430
<div class="refsect2" lang="en">
437
 
<a name="id2566621"></a><h3>
 
431
<a name="id2608360"></a><h3>
438
432
<a name="gimp-vector2-neg"></a>gimp_vector2_neg ()</h3>
439
 
<a class="indexterm" name="id2566629"></a><pre class="programlisting">void        gimp_vector2_neg                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector);</pre>
 
433
<a class="indexterm" name="id2608370"></a><pre class="programlisting">void                gimp_vector2_neg                    (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector);</pre>
440
434
<p>
441
435
Negates the <em class="parameter"><code>vector</code></em> (i.e. negate all its coordinates).</p>
442
436
<p>
445
439
<div class="variablelist"><table border="0">
446
440
<col align="left" valign="top">
447
441
<tbody><tr>
448
 
<td>
449
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
442
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
450
443
<td> a pointer to a <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
451
444
</td>
452
445
</tr></tbody>
454
447
</div>
455
448
<hr>
456
449
<div class="refsect2" lang="en">
457
 
<a name="id2566685"></a><h3>
 
450
<a name="id2608426"></a><h3>
458
451
<a name="gimp-vector2-neg-val"></a>gimp_vector2_neg_val ()</h3>
459
 
<a class="indexterm" name="id2566694"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> gimp_vector2_neg_val            (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector);</pre>
 
452
<a class="indexterm" name="id2608436"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         gimp_vector2_neg_val                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector);</pre>
460
453
<p>
461
454
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector2-neg"><code class="function">gimp_vector2_neg()</code></a> but the vector
462
455
is passed by value rather than by reference.</p>
467
460
<col align="left" valign="top">
468
461
<tbody>
469
462
<tr>
470
 
<td>
471
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
463
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
472
464
<td> a <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
473
465
</td>
474
466
</tr>
475
467
<tr>
476
 
<td>
477
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
468
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
478
469
<td> the negated <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
479
470
</td>
480
471
</tr>
483
474
</div>
484
475
<hr>
485
476
<div class="refsect2" lang="en">
486
 
<a name="id2566769"></a><h3>
 
477
<a name="id2608513"></a><h3>
487
478
<a name="gimp-vector2-add"></a>gimp_vector2_add ()</h3>
488
 
<a class="indexterm" name="id2566778"></a><pre class="programlisting">void        gimp_vector2_add                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *result,
489
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
490
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);</pre>
 
479
<a class="indexterm" name="id2608523"></a><pre class="programlisting">void                gimp_vector2_add                    (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *result,
 
480
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
 
481
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);</pre>
491
482
<p>
492
483
Computes the sum of two 2D vectors. The resulting <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a> is
493
484
stored in <em class="parameter"><code>result</code></em>.</p>
498
489
<col align="left" valign="top">
499
490
<tbody>
500
491
<tr>
501
 
<td>
502
 
<span class="term"><em class="parameter"><code>result</code></em>&#160;:</span></td>
 
492
<td><span class="term"><em class="parameter"><code>result</code></em>&#160;:</span></td>
503
493
<td> destination for the resulting <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
504
494
</td>
505
495
</tr>
506
496
<tr>
507
 
<td>
508
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
497
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
509
498
<td> a pointer to the first <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
510
499
</td>
511
500
</tr>
512
501
<tr>
513
 
<td>
514
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
502
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
515
503
<td> a pointer to the second <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
516
504
</td>
517
505
</tr>
520
508
</div>
521
509
<hr>
522
510
<div class="refsect2" lang="en">
523
 
<a name="id2566892"></a><h3>
 
511
<a name="id2608637"></a><h3>
524
512
<a name="gimp-vector2-add-val"></a>gimp_vector2_add_val ()</h3>
525
 
<a class="indexterm" name="id2566900"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> gimp_vector2_add_val            (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
526
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);</pre>
 
513
<a class="indexterm" name="id2608648"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         gimp_vector2_add_val                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
 
514
                                                         <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);</pre>
527
515
<p>
528
516
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector2-add"><code class="function">gimp_vector2_add()</code></a> but the vectors
529
517
are passed by value rather than by reference.</p>
534
522
<col align="left" valign="top">
535
523
<tbody>
536
524
<tr>
537
 
<td>
538
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
525
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
539
526
<td> the first <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
540
527
</td>
541
528
</tr>
542
529
<tr>
543
 
<td>
544
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
530
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
545
531
<td> the second <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
546
532
</td>
547
533
</tr>
548
534
<tr>
549
 
<td>
550
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
535
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
551
536
<td> the resulting <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
552
537
</td>
553
538
</tr>
556
541
</div>
557
542
<hr>
558
543
<div class="refsect2" lang="en">
559
 
<a name="id2567001"></a><h3>
 
544
<a name="id2608749"></a><h3>
560
545
<a name="gimp-vector2-sub"></a>gimp_vector2_sub ()</h3>
561
 
<a class="indexterm" name="id2567009"></a><pre class="programlisting">void        gimp_vector2_sub                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *result,
562
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
563
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);</pre>
 
546
<a class="indexterm" name="id2608760"></a><pre class="programlisting">void                gimp_vector2_sub                    (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *result,
 
547
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
 
548
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);</pre>
564
549
<p>
565
550
Computes the difference of two 2D vectors (<em class="parameter"><code>vector1</code></em> minus <em class="parameter"><code>vector2</code></em>).
566
551
The resulting <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a> is stored in <em class="parameter"><code>result</code></em>.</p>
571
556
<col align="left" valign="top">
572
557
<tbody>
573
558
<tr>
574
 
<td>
575
 
<span class="term"><em class="parameter"><code>result</code></em>&#160;:</span></td>
 
559
<td><span class="term"><em class="parameter"><code>result</code></em>&#160;:</span></td>
576
560
<td> the destination for the resulting <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
577
561
</td>
578
562
</tr>
579
563
<tr>
580
 
<td>
581
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
564
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
582
565
<td> a pointer to the first <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
583
566
</td>
584
567
</tr>
585
568
<tr>
586
 
<td>
587
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
569
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
588
570
<td> a pointer to the second <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
589
571
</td>
590
572
</tr>
593
575
</div>
594
576
<hr>
595
577
<div class="refsect2" lang="en">
596
 
<a name="id2567134"></a><h3>
 
578
<a name="id2608884"></a><h3>
597
579
<a name="gimp-vector2-sub-val"></a>gimp_vector2_sub_val ()</h3>
598
 
<a class="indexterm" name="id2567142"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> gimp_vector2_sub_val            (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
599
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);</pre>
 
580
<a class="indexterm" name="id2608895"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         gimp_vector2_sub_val                (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
 
581
                                                         <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);</pre>
600
582
<p>
601
583
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector2-sub"><code class="function">gimp_vector2_sub()</code></a> but the vectors
602
584
are passed by value rather than by reference.</p>
607
589
<col align="left" valign="top">
608
590
<tbody>
609
591
<tr>
610
 
<td>
611
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
592
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
612
593
<td> the first <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
613
594
</td>
614
595
</tr>
615
596
<tr>
616
 
<td>
617
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
597
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
618
598
<td> the second <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
619
599
</td>
620
600
</tr>
621
601
<tr>
622
 
<td>
623
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
602
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
624
603
<td> the resulting <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
625
604
</td>
626
605
</tr>
629
608
</div>
630
609
<hr>
631
610
<div class="refsect2" lang="en">
632
 
<a name="id2567243"></a><h3>
 
611
<a name="id2608996"></a><h3>
633
612
<a name="gimp-vector2-inner-product"></a>gimp_vector2_inner_product ()</h3>
634
 
<a class="indexterm" name="id2567252"></a><pre class="programlisting">gdouble     gimp_vector2_inner_product      (const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
635
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);</pre>
 
613
<a class="indexterm" name="id2609007"></a><pre class="programlisting">gdouble             gimp_vector2_inner_product          (const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
 
614
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);</pre>
636
615
<p>
637
616
Computes the inner (dot) product of two 2D vectors.
638
617
This product is zero if and only if the two vectors are orthognal.</p>
643
622
<col align="left" valign="top">
644
623
<tbody>
645
624
<tr>
646
 
<td>
647
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
625
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
648
626
<td> a pointer to the first <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
649
627
</td>
650
628
</tr>
651
629
<tr>
652
 
<td>
653
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
630
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
654
631
<td> a pointer to the second <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
655
632
</td>
656
633
</tr>
657
634
<tr>
658
 
<td>
659
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
635
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
660
636
<td> The inner product.
661
637
</td>
662
638
</tr>
665
641
</div>
666
642
<hr>
667
643
<div class="refsect2" lang="en">
668
 
<a name="id2567339"></a><h3>
 
644
<a name="id2609095"></a><h3>
669
645
<a name="gimp-vector2-inner-product-val"></a>gimp_vector2_inner_product_val ()</h3>
670
 
<a class="indexterm" name="id2567350"></a><pre class="programlisting">gdouble     gimp_vector2_inner_product_val  (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
671
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);</pre>
 
646
<a class="indexterm" name="id2609107"></a><pre class="programlisting">gdouble             gimp_vector2_inner_product_val      (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
 
647
                                                         <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);</pre>
672
648
<p>
673
649
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector2-inner-product"><code class="function">gimp_vector2_inner_product()</code></a> but the
674
650
vectors are passed by value rather than by reference.</p>
679
655
<col align="left" valign="top">
680
656
<tbody>
681
657
<tr>
682
 
<td>
683
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
658
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
684
659
<td> the first <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
685
660
</td>
686
661
</tr>
687
662
<tr>
688
 
<td>
689
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
663
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
690
664
<td> the second <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
691
665
</td>
692
666
</tr>
693
667
<tr>
694
 
<td>
695
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
668
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
696
669
<td> The inner product.
697
670
</td>
698
671
</tr>
701
674
</div>
702
675
<hr>
703
676
<div class="refsect2" lang="en">
704
 
<a name="id2567446"></a><h3>
 
677
<a name="id2609204"></a><h3>
705
678
<a name="gimp-vector2-cross-product"></a>gimp_vector2_cross_product ()</h3>
706
 
<a class="indexterm" name="id2567455"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> gimp_vector2_cross_product      (const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
707
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);</pre>
 
679
<a class="indexterm" name="id2609215"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         gimp_vector2_cross_product          (const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector1,
 
680
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector2);</pre>
708
681
<p>
709
682
Compute the cross product of two vectors. The result is a
710
683
<a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a> which is orthognal to both <em class="parameter"><code>vector1</code></em> and <em class="parameter"><code>vector2</code></em>. If
721
694
<col align="left" valign="top">
722
695
<tbody>
723
696
<tr>
724
 
<td>
725
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
697
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
726
698
<td> a pointer to the first <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
727
699
</td>
728
700
</tr>
729
701
<tr>
730
 
<td>
731
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
702
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
732
703
<td> a pointer to the second <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
733
704
</td>
734
705
</tr>
735
706
<tr>
736
 
<td>
737
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
707
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
738
708
<td> The cross product.
739
709
</td>
740
710
</tr>
743
713
</div>
744
714
<hr>
745
715
<div class="refsect2" lang="en">
746
 
<a name="id2567575"></a><h3>
 
716
<a name="id2609335"></a><h3>
747
717
<a name="gimp-vector2-cross-product-val"></a>gimp_vector2_cross_product_val ()</h3>
748
 
<a class="indexterm" name="id2567586"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> gimp_vector2_cross_product_val  (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
749
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);</pre>
 
718
<a class="indexterm" name="id2609348"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         gimp_vector2_cross_product_val      (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector1,
 
719
                                                         <a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector2);</pre>
750
720
<p>
751
721
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector2-cross-product"><code class="function">gimp_vector2_cross_product()</code></a> but the
752
722
vectors are passed by value rather than by reference.</p>
757
727
<col align="left" valign="top">
758
728
<tbody>
759
729
<tr>
760
 
<td>
761
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
730
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
762
731
<td> the first <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
763
732
</td>
764
733
</tr>
765
734
<tr>
766
 
<td>
767
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
735
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
768
736
<td> the second <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
769
737
</td>
770
738
</tr>
771
739
<tr>
772
 
<td>
773
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
740
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
774
741
<td> The cross product.
775
742
</td>
776
743
</tr>
779
746
</div>
780
747
<hr>
781
748
<div class="refsect2" lang="en">
782
 
<a name="id2567682"></a><h3>
 
749
<a name="id2609444"></a><h3>
783
750
<a name="gimp-vector2-rotate"></a>gimp_vector2_rotate ()</h3>
784
 
<a class="indexterm" name="id2567690"></a><pre class="programlisting">void        gimp_vector2_rotate             (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector,
785
 
                                             gdouble alpha);</pre>
 
751
<a class="indexterm" name="id2609455"></a><pre class="programlisting">void                gimp_vector2_rotate                 (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> *vector,
 
752
                                                         gdouble alpha);</pre>
786
753
<p>
787
754
Rotates the <em class="parameter"><code>vector</code></em> counterclockwise by <em class="parameter"><code>alpha</code></em> radians.</p>
788
755
<p>
792
759
<col align="left" valign="top">
793
760
<tbody>
794
761
<tr>
795
 
<td>
796
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
762
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
797
763
<td> a pointer to a <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
798
764
</td>
799
765
</tr>
800
766
<tr>
801
 
<td>
802
 
<span class="term"><em class="parameter"><code>alpha</code></em>&#160;:</span></td>
 
767
<td><span class="term"><em class="parameter"><code>alpha</code></em>&#160;:</span></td>
803
768
<td> an angle (in radians).
804
769
</td>
805
770
</tr>
808
773
</div>
809
774
<hr>
810
775
<div class="refsect2" lang="en">
811
 
<a name="id2567770"></a><h3>
 
776
<a name="id2609534"></a><h3>
812
777
<a name="gimp-vector2-rotate-val"></a>gimp_vector2_rotate_val ()</h3>
813
 
<a class="indexterm" name="id2567778"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> gimp_vector2_rotate_val         (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector,
814
 
                                             gdouble alpha);</pre>
 
778
<a class="indexterm" name="id2609545"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a>         gimp_vector2_rotate_val             (<a href="libgimpmath-GimpVector.html#GimpVector2">GimpVector2</a> vector,
 
779
                                                         gdouble alpha);</pre>
815
780
<p>
816
781
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector2-rotate"><code class="function">gimp_vector2_rotate()</code></a> but the vector
817
782
is passed by value rather than by reference.</p>
822
787
<col align="left" valign="top">
823
788
<tbody>
824
789
<tr>
825
 
<td>
826
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
790
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
827
791
<td> a <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a>.
828
792
</td>
829
793
</tr>
830
794
<tr>
831
 
<td>
832
 
<span class="term"><em class="parameter"><code>alpha</code></em>&#160;:</span></td>
 
795
<td><span class="term"><em class="parameter"><code>alpha</code></em>&#160;:</span></td>
833
796
<td> an angle (in radians).
834
797
</td>
835
798
</tr>
836
799
<tr>
837
 
<td>
838
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
800
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
839
801
<td> a <a href="libgimpmath-GimpVector.html#GimpVector2"><span class="type">GimpVector2</span></a> representing <em class="parameter"><code>vector</code></em> rotated by <em class="parameter"><code>alpha</code></em>
840
802
radians.
841
803
</td>
845
807
</div>
846
808
<hr>
847
809
<div class="refsect2" lang="en">
848
 
<a name="id2567883"></a><h3>
 
810
<a name="id2609650"></a><h3>
849
811
<a name="gimp-vector3-new"></a>gimp_vector3_new ()</h3>
850
 
<a class="indexterm" name="id2567892"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> gimp_vector3_new                (gdouble x,
851
 
                                             gdouble y,
852
 
                                             gdouble z);</pre>
 
812
<a class="indexterm" name="id2609661"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         gimp_vector3_new                    (gdouble x,
 
813
                                                         gdouble y,
 
814
                                                         gdouble z);</pre>
853
815
<p>
854
816
Creates a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a> of coordinate <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> and <em class="parameter"><code>z</code></em>.</p>
855
817
<p>
859
821
<col align="left" valign="top">
860
822
<tbody>
861
823
<tr>
862
 
<td>
863
 
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
 
824
<td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
864
825
<td> the X coordinate.
865
826
</td>
866
827
</tr>
867
828
<tr>
868
 
<td>
869
 
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
 
829
<td><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
870
830
<td> the Y coordinate.
871
831
</td>
872
832
</tr>
873
833
<tr>
874
 
<td>
875
 
<span class="term"><em class="parameter"><code>z</code></em>&#160;:</span></td>
 
834
<td><span class="term"><em class="parameter"><code>z</code></em>&#160;:</span></td>
876
835
<td> the Z coordinate.
877
836
</td>
878
837
</tr>
879
838
<tr>
880
 
<td>
881
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
839
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
882
840
<td> the resulting <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
883
841
</td>
884
842
</tr>
887
845
</div>
888
846
<hr>
889
847
<div class="refsect2" lang="en">
890
 
<a name="id2568010"></a><h3>
 
848
<a name="id2609780"></a><h3>
891
849
<a name="gimp-vector3-set"></a>gimp_vector3_set ()</h3>
892
 
<a class="indexterm" name="id2568019"></a><pre class="programlisting">void        gimp_vector3_set                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector,
893
 
                                             gdouble x,
894
 
                                             gdouble y,
895
 
                                             gdouble z);</pre>
 
850
<a class="indexterm" name="id2609791"></a><pre class="programlisting">void                gimp_vector3_set                    (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector,
 
851
                                                         gdouble x,
 
852
                                                         gdouble y,
 
853
                                                         gdouble z);</pre>
896
854
<p>
897
855
Sets the X, Y and Z coordinates of <em class="parameter"><code>vector</code></em> to <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> and <em class="parameter"><code>z</code></em>.</p>
898
856
<p>
902
860
<col align="left" valign="top">
903
861
<tbody>
904
862
<tr>
905
 
<td>
906
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
863
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
907
864
<td> a pointer to a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
908
865
</td>
909
866
</tr>
910
867
<tr>
911
 
<td>
912
 
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
 
868
<td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
913
869
<td> the X coordinate.
914
870
</td>
915
871
</tr>
916
872
<tr>
917
 
<td>
918
 
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
 
873
<td><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
919
874
<td> the Y coordinate.
920
875
</td>
921
876
</tr>
922
877
<tr>
923
 
<td>
924
 
<span class="term"><em class="parameter"><code>z</code></em>&#160;:</span></td>
 
878
<td><span class="term"><em class="parameter"><code>z</code></em>&#160;:</span></td>
925
879
<td> the Z coordinate.
926
880
</td>
927
881
</tr>
930
884
</div>
931
885
<hr>
932
886
<div class="refsect2" lang="en">
933
 
<a name="id2568147"></a><h3>
 
887
<a name="id2609920"></a><h3>
934
888
<a name="gimp-vector3-length"></a>gimp_vector3_length ()</h3>
935
 
<a class="indexterm" name="id2568155"></a><pre class="programlisting">gdouble     gimp_vector3_length             (const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector);</pre>
 
889
<a class="indexterm" name="id2609930"></a><pre class="programlisting">gdouble             gimp_vector3_length                 (const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector);</pre>
936
890
<p>
937
891
Computes the length of a 3D vector.</p>
938
892
<p>
942
896
<col align="left" valign="top">
943
897
<tbody>
944
898
<tr>
945
 
<td>
946
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
899
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
947
900
<td> a pointer to a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
948
901
</td>
949
902
</tr>
950
903
<tr>
951
 
<td>
952
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
904
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
953
905
<td> the length of <em class="parameter"><code>vector</code></em> (a positive gdouble).
954
906
</td>
955
907
</tr>
958
910
</div>
959
911
<hr>
960
912
<div class="refsect2" lang="en">
961
 
<a name="id2568221"></a><h3>
 
913
<a name="id2609996"></a><h3>
962
914
<a name="gimp-vector3-length-val"></a>gimp_vector3_length_val ()</h3>
963
 
<a class="indexterm" name="id2568230"></a><pre class="programlisting">gdouble     gimp_vector3_length_val         (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector);</pre>
 
915
<a class="indexterm" name="id2610007"></a><pre class="programlisting">gdouble             gimp_vector3_length_val             (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector);</pre>
964
916
<p>
965
917
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector3-length"><code class="function">gimp_vector3_length()</code></a> but the vector
966
918
is passed by value rather than by reference.</p>
971
923
<col align="left" valign="top">
972
924
<tbody>
973
925
<tr>
974
 
<td>
975
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
926
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
976
927
<td> a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
977
928
</td>
978
929
</tr>
979
930
<tr>
980
 
<td>
981
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
931
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
982
932
<td> the length of <em class="parameter"><code>vector</code></em> (a positive gdouble).
983
933
</td>
984
934
</tr>
987
937
</div>
988
938
<hr>
989
939
<div class="refsect2" lang="en">
990
 
<a name="id2568304"></a><h3>
 
940
<a name="id2610082"></a><h3>
991
941
<a name="gimp-vector3-mul"></a>gimp_vector3_mul ()</h3>
992
 
<a class="indexterm" name="id2568313"></a><pre class="programlisting">void        gimp_vector3_mul                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector,
993
 
                                             gdouble factor);</pre>
 
942
<a class="indexterm" name="id2610092"></a><pre class="programlisting">void                gimp_vector3_mul                    (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector,
 
943
                                                         gdouble factor);</pre>
994
944
<p>
995
945
Multiplies each component of the <em class="parameter"><code>vector</code></em> by <em class="parameter"><code>factor</code></em>. Note that
996
946
this is equivalent to multiplying the vectors length by <em class="parameter"><code>factor</code></em>.</p>
1001
951
<col align="left" valign="top">
1002
952
<tbody>
1003
953
<tr>
1004
 
<td>
1005
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
954
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
1006
955
<td> a pointer to a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1007
956
</td>
1008
957
</tr>
1009
958
<tr>
1010
 
<td>
1011
 
<span class="term"><em class="parameter"><code>factor</code></em>&#160;:</span></td>
 
959
<td><span class="term"><em class="parameter"><code>factor</code></em>&#160;:</span></td>
1012
960
<td> a scalar.
1013
961
</td>
1014
962
</tr>
1017
965
</div>
1018
966
<hr>
1019
967
<div class="refsect2" lang="en">
1020
 
<a name="id2568399"></a><h3>
 
968
<a name="id2610179"></a><h3>
1021
969
<a name="gimp-vector3-mul-val"></a>gimp_vector3_mul_val ()</h3>
1022
 
<a class="indexterm" name="id2568408"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> gimp_vector3_mul_val            (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector,
1023
 
                                             gdouble factor);</pre>
 
970
<a class="indexterm" name="id2610189"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         gimp_vector3_mul_val                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector,
 
971
                                                         gdouble factor);</pre>
1024
972
<p>
1025
973
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector3-mul"><code class="function">gimp_vector3_mul()</code></a> but the vector is
1026
974
passed by value rather than by reference.</p>
1031
979
<col align="left" valign="top">
1032
980
<tbody>
1033
981
<tr>
1034
 
<td>
1035
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
982
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
1036
983
<td> a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1037
984
</td>
1038
985
</tr>
1039
986
<tr>
1040
 
<td>
1041
 
<span class="term"><em class="parameter"><code>factor</code></em>&#160;:</span></td>
 
987
<td><span class="term"><em class="parameter"><code>factor</code></em>&#160;:</span></td>
1042
988
<td> a scalar.
1043
989
</td>
1044
990
</tr>
1045
991
<tr>
1046
 
<td>
1047
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
992
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
1048
993
<td> the resulting <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1049
994
</td>
1050
995
</tr>
1053
998
</div>
1054
999
<hr>
1055
1000
<div class="refsect2" lang="en">
1056
 
<a name="id2568503"></a><h3>
 
1001
<a name="id2610291"></a><h3>
1057
1002
<a name="gimp-vector3-normalize"></a>gimp_vector3_normalize ()</h3>
1058
 
<a class="indexterm" name="id2568511"></a><pre class="programlisting">void        gimp_vector3_normalize          (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector);</pre>
 
1003
<a class="indexterm" name="id2610304"></a><pre class="programlisting">void                gimp_vector3_normalize              (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector);</pre>
1059
1004
<p>
1060
1005
Normalizes the <em class="parameter"><code>vector</code></em> so the length of the <em class="parameter"><code>vector</code></em> is 1.0. The nul
1061
1006
vector will not be changed.</p>
1065
1010
<div class="variablelist"><table border="0">
1066
1011
<col align="left" valign="top">
1067
1012
<tbody><tr>
1068
 
<td>
1069
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
1013
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
1070
1014
<td> a pointer to a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1071
1015
</td>
1072
1016
</tr></tbody>
1074
1018
</div>
1075
1019
<hr>
1076
1020
<div class="refsect2" lang="en">
1077
 
<a name="id2568581"></a><h3>
 
1021
<a name="id2610375"></a><h3>
1078
1022
<a name="gimp-vector3-normalize-val"></a>gimp_vector3_normalize_val ()</h3>
1079
 
<a class="indexterm" name="id2568593"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> gimp_vector3_normalize_val      (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector);</pre>
 
1023
<a class="indexterm" name="id2610389"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         gimp_vector3_normalize_val          (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector);</pre>
1080
1024
<p>
1081
1025
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector3-normalize"><code class="function">gimp_vector3_normalize()</code></a> but the
1082
1026
vector is passed by value rather than by reference.</p>
1087
1031
<col align="left" valign="top">
1088
1032
<tbody>
1089
1033
<tr>
1090
 
<td>
1091
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
1034
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
1092
1035
<td> a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1093
1036
</td>
1094
1037
</tr>
1095
1038
<tr>
1096
 
<td>
1097
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1039
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
1098
1040
<td> a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a> parallel to <em class="parameter"><code>vector</code></em>, pointing in the same
1099
1041
direction but with a length of 1.0.
1100
1042
</td>
1104
1046
</div>
1105
1047
<hr>
1106
1048
<div class="refsect2" lang="en">
1107
 
<a name="id2568685"></a><h3>
 
1049
<a name="id2610481"></a><h3>
1108
1050
<a name="gimp-vector3-neg"></a>gimp_vector3_neg ()</h3>
1109
 
<a class="indexterm" name="id2568695"></a><pre class="programlisting">void        gimp_vector3_neg                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector);</pre>
 
1051
<a class="indexterm" name="id2610494"></a><pre class="programlisting">void                gimp_vector3_neg                    (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector);</pre>
1110
1052
<p>
1111
1053
Negates the <em class="parameter"><code>vector</code></em> (i.e. negate all its coordinates).</p>
1112
1054
<p>
1115
1057
<div class="variablelist"><table border="0">
1116
1058
<col align="left" valign="top">
1117
1059
<tbody><tr>
1118
 
<td>
1119
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
1060
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
1120
1061
<td> a pointer to a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1121
1062
</td>
1122
1063
</tr></tbody>
1124
1065
</div>
1125
1066
<hr>
1126
1067
<div class="refsect2" lang="en">
1127
 
<a name="id2568759"></a><h3>
 
1068
<a name="id2610558"></a><h3>
1128
1069
<a name="gimp-vector3-neg-val"></a>gimp_vector3_neg_val ()</h3>
1129
 
<a class="indexterm" name="id2568770"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> gimp_vector3_neg_val            (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector);</pre>
 
1070
<a class="indexterm" name="id2610571"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         gimp_vector3_neg_val                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector);</pre>
1130
1071
<p>
1131
1072
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector3-neg"><code class="function">gimp_vector3_neg()</code></a> but the vector
1132
1073
is passed by value rather than by reference.</p>
1137
1078
<col align="left" valign="top">
1138
1079
<tbody>
1139
1080
<tr>
1140
 
<td>
1141
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
1081
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
1142
1082
<td> a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1143
1083
</td>
1144
1084
</tr>
1145
1085
<tr>
1146
 
<td>
1147
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1086
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
1148
1087
<td> the negated <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1149
1088
</td>
1150
1089
</tr>
1153
1092
</div>
1154
1093
<hr>
1155
1094
<div class="refsect2" lang="en">
1156
 
<a name="id2568855"></a><h3>
 
1095
<a name="id2610657"></a><h3>
1157
1096
<a name="gimp-vector3-add"></a>gimp_vector3_add ()</h3>
1158
 
<a class="indexterm" name="id2568866"></a><pre class="programlisting">void        gimp_vector3_add                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *result,
1159
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
1160
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);</pre>
 
1097
<a class="indexterm" name="id2610670"></a><pre class="programlisting">void                gimp_vector3_add                    (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *result,
 
1098
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
 
1099
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);</pre>
1161
1100
<p>
1162
1101
Computes the sum of two 3D vectors. The resulting <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a> is
1163
1102
stored in <em class="parameter"><code>result</code></em>.</p>
1168
1107
<col align="left" valign="top">
1169
1108
<tbody>
1170
1109
<tr>
1171
 
<td>
1172
 
<span class="term"><em class="parameter"><code>result</code></em>&#160;:</span></td>
 
1110
<td><span class="term"><em class="parameter"><code>result</code></em>&#160;:</span></td>
1173
1111
<td> destination for the resulting <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1174
1112
</td>
1175
1113
</tr>
1176
1114
<tr>
1177
 
<td>
1178
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
1115
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
1179
1116
<td> a pointer to the first <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1180
1117
</td>
1181
1118
</tr>
1182
1119
<tr>
1183
 
<td>
1184
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
1120
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
1185
1121
<td> a pointer to the second <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1186
1122
</td>
1187
1123
</tr>
1190
1126
</div>
1191
1127
<hr>
1192
1128
<div class="refsect2" lang="en">
1193
 
<a name="id2568994"></a><h3>
 
1129
<a name="id2610798"></a><h3>
1194
1130
<a name="gimp-vector3-add-val"></a>gimp_vector3_add_val ()</h3>
1195
 
<a class="indexterm" name="id2569005"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> gimp_vector3_add_val            (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
1196
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);</pre>
 
1131
<a class="indexterm" name="id2610811"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         gimp_vector3_add_val                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
 
1132
                                                         <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);</pre>
1197
1133
<p>
1198
1134
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector3-add"><code class="function">gimp_vector3_add()</code></a> but the vectors
1199
1135
are passed by value rather than by reference.</p>
1204
1140
<col align="left" valign="top">
1205
1141
<tbody>
1206
1142
<tr>
1207
 
<td>
1208
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
1209
 
<td> a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1210
 
</td>
1211
 
</tr>
1212
 
<tr>
1213
 
<td>
1214
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
1215
 
<td> a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1216
 
</td>
1217
 
</tr>
1218
 
<tr>
1219
 
<td>
1220
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1143
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
1144
<td> a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
 
1145
</td>
 
1146
</tr>
 
1147
<tr>
 
1148
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
1149
<td> a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
 
1150
</td>
 
1151
</tr>
 
1152
<tr>
 
1153
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
1221
1154
<td> the resulting <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1222
1155
</td>
1223
1156
</tr>
1226
1159
</div>
1227
1160
<hr>
1228
1161
<div class="refsect2" lang="en">
1229
 
<a name="id2569119"></a><h3>
 
1162
<a name="id2610925"></a><h3>
1230
1163
<a name="gimp-vector3-sub"></a>gimp_vector3_sub ()</h3>
1231
 
<a class="indexterm" name="id2569129"></a><pre class="programlisting">void        gimp_vector3_sub                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *result,
1232
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
1233
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);</pre>
 
1164
<a class="indexterm" name="id2610938"></a><pre class="programlisting">void                gimp_vector3_sub                    (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *result,
 
1165
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
 
1166
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);</pre>
1234
1167
<p>
1235
1168
Computes the difference of two 3D vectors (<em class="parameter"><code>vector1</code></em> minus <em class="parameter"><code>vector2</code></em>).
1236
1169
The resulting <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a> is stored in <em class="parameter"><code>result</code></em>.</p>
1241
1174
<col align="left" valign="top">
1242
1175
<tbody>
1243
1176
<tr>
1244
 
<td>
1245
 
<span class="term"><em class="parameter"><code>result</code></em>&#160;:</span></td>
 
1177
<td><span class="term"><em class="parameter"><code>result</code></em>&#160;:</span></td>
1246
1178
<td> the destination for the resulting <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1247
1179
</td>
1248
1180
</tr>
1249
1181
<tr>
1250
 
<td>
1251
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
1182
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
1252
1183
<td> a pointer to the first <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1253
1184
</td>
1254
1185
</tr>
1255
1186
<tr>
1256
 
<td>
1257
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
1187
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
1258
1188
<td> a pointer to the second <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1259
1189
</td>
1260
1190
</tr>
1263
1193
</div>
1264
1194
<hr>
1265
1195
<div class="refsect2" lang="en">
1266
 
<a name="id2569269"></a><h3>
 
1196
<a name="id2611079"></a><h3>
1267
1197
<a name="gimp-vector3-sub-val"></a>gimp_vector3_sub_val ()</h3>
1268
 
<a class="indexterm" name="id2569281"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> gimp_vector3_sub_val            (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
1269
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);</pre>
 
1198
<a class="indexterm" name="id2611093"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         gimp_vector3_sub_val                (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
 
1199
                                                         <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);</pre>
1270
1200
<p>
1271
1201
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector3-sub"><code class="function">gimp_vector3_sub()</code></a> but the vectors
1272
1202
are passed by value rather than by reference.</p>
1277
1207
<col align="left" valign="top">
1278
1208
<tbody>
1279
1209
<tr>
1280
 
<td>
1281
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
1282
 
<td> a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1283
 
</td>
1284
 
</tr>
1285
 
<tr>
1286
 
<td>
1287
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
1288
 
<td> a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1289
 
</td>
1290
 
</tr>
1291
 
<tr>
1292
 
<td>
1293
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1210
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
1211
<td> a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
 
1212
</td>
 
1213
</tr>
 
1214
<tr>
 
1215
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
1216
<td> a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
 
1217
</td>
 
1218
</tr>
 
1219
<tr>
 
1220
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
1294
1221
<td> the resulting <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1295
1222
</td>
1296
1223
</tr>
1299
1226
</div>
1300
1227
<hr>
1301
1228
<div class="refsect2" lang="en">
1302
 
<a name="id2569395"></a><h3>
 
1229
<a name="id2611207"></a><h3>
1303
1230
<a name="gimp-vector3-inner-product"></a>gimp_vector3_inner_product ()</h3>
1304
 
<a class="indexterm" name="id2569406"></a><pre class="programlisting">gdouble     gimp_vector3_inner_product      (const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
1305
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);</pre>
 
1231
<a class="indexterm" name="id2611221"></a><pre class="programlisting">gdouble             gimp_vector3_inner_product          (const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
 
1232
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);</pre>
1306
1233
<p>
1307
1234
Computes the inner (dot) product of two 3D vectors. This product
1308
1235
is zero if and only if the two vectors are orthognal.</p>
1313
1240
<col align="left" valign="top">
1314
1241
<tbody>
1315
1242
<tr>
1316
 
<td>
1317
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
1243
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
1318
1244
<td> a pointer to the first <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1319
1245
</td>
1320
1246
</tr>
1321
1247
<tr>
1322
 
<td>
1323
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
1248
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
1324
1249
<td> a pointer to the second <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1325
1250
</td>
1326
1251
</tr>
1327
1252
<tr>
1328
 
<td>
1329
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1253
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
1330
1254
<td> The inner product.
1331
1255
</td>
1332
1256
</tr>
1335
1259
</div>
1336
1260
<hr>
1337
1261
<div class="refsect2" lang="en">
1338
 
<a name="id2569504"></a><h3>
 
1262
<a name="id2611319"></a><h3>
1339
1263
<a name="gimp-vector3-inner-product-val"></a>gimp_vector3_inner_product_val ()</h3>
1340
 
<a class="indexterm" name="id2569516"></a><pre class="programlisting">gdouble     gimp_vector3_inner_product_val  (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
1341
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);</pre>
 
1264
<a class="indexterm" name="id2611333"></a><pre class="programlisting">gdouble             gimp_vector3_inner_product_val      (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
 
1265
                                                         <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);</pre>
1342
1266
<p>
1343
1267
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector3-inner-product"><code class="function">gimp_vector3_inner_product()</code></a> but the
1344
1268
vectors are passed by value rather than by reference.</p>
1349
1273
<col align="left" valign="top">
1350
1274
<tbody>
1351
1275
<tr>
1352
 
<td>
1353
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
1276
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
1354
1277
<td> the first <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1355
1278
</td>
1356
1279
</tr>
1357
1280
<tr>
1358
 
<td>
1359
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
1281
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
1360
1282
<td> the second <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1361
1283
</td>
1362
1284
</tr>
1363
1285
<tr>
1364
 
<td>
1365
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1286
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
1366
1287
<td> The inner product.
1367
1288
</td>
1368
1289
</tr>
1371
1292
</div>
1372
1293
<hr>
1373
1294
<div class="refsect2" lang="en">
1374
 
<a name="id2569624"></a><h3>
 
1295
<a name="id2611441"></a><h3>
1375
1296
<a name="gimp-vector3-cross-product"></a>gimp_vector3_cross_product ()</h3>
1376
 
<a class="indexterm" name="id2569636"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> gimp_vector3_cross_product      (const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
1377
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);</pre>
 
1297
<a class="indexterm" name="id2611455"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         gimp_vector3_cross_product          (const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector1,
 
1298
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector2);</pre>
1378
1299
<p>
1379
1300
Compute the cross product of two vectors. The result is a
1380
1301
<a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a> which is orthognal to both <em class="parameter"><code>vector1</code></em> and <em class="parameter"><code>vector2</code></em>. If
1391
1312
<col align="left" valign="top">
1392
1313
<tbody>
1393
1314
<tr>
1394
 
<td>
1395
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
1315
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
1396
1316
<td> a pointer to the first <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1397
1317
</td>
1398
1318
</tr>
1399
1319
<tr>
1400
 
<td>
1401
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
1320
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
1402
1321
<td> a pointer to the second <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1403
1322
</td>
1404
1323
</tr>
1405
1324
<tr>
1406
 
<td>
1407
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1325
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
1408
1326
<td> The cross product.
1409
1327
</td>
1410
1328
</tr>
1413
1331
</div>
1414
1332
<hr>
1415
1333
<div class="refsect2" lang="en">
1416
 
<a name="id2569781"></a><h3>
 
1334
<a name="id2611601"></a><h3>
1417
1335
<a name="gimp-vector3-cross-product-val"></a>gimp_vector3_cross_product_val ()</h3>
1418
 
<a class="indexterm" name="id2569793"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> gimp_vector3_cross_product_val  (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
1419
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);</pre>
 
1336
<a class="indexterm" name="id2611616"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         gimp_vector3_cross_product_val      (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector1,
 
1337
                                                         <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector2);</pre>
1420
1338
<p>
1421
1339
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector3-cross-product"><code class="function">gimp_vector3_cross_product()</code></a> but the
1422
1340
vectors are passed by value rather than by reference.</p>
1427
1345
<col align="left" valign="top">
1428
1346
<tbody>
1429
1347
<tr>
1430
 
<td>
1431
 
<span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
 
1348
<td><span class="term"><em class="parameter"><code>vector1</code></em>&#160;:</span></td>
1432
1349
<td> the first <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1433
1350
</td>
1434
1351
</tr>
1435
1352
<tr>
1436
 
<td>
1437
 
<span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
 
1353
<td><span class="term"><em class="parameter"><code>vector2</code></em>&#160;:</span></td>
1438
1354
<td> the second <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1439
1355
</td>
1440
1356
</tr>
1441
1357
<tr>
1442
 
<td>
1443
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1358
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
1444
1359
<td> The cross product.
1445
1360
</td>
1446
1361
</tr>
1449
1364
</div>
1450
1365
<hr>
1451
1366
<div class="refsect2" lang="en">
1452
 
<a name="id2569901"></a><h3>
 
1367
<a name="id2611723"></a><h3>
1453
1368
<a name="gimp-vector3-rotate"></a>gimp_vector3_rotate ()</h3>
1454
 
<a class="indexterm" name="id2569912"></a><pre class="programlisting">void        gimp_vector3_rotate             (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector,
1455
 
                                             gdouble alpha,
1456
 
                                             gdouble beta,
1457
 
                                             gdouble gamma);</pre>
 
1369
<a class="indexterm" name="id2611737"></a><pre class="programlisting">void                gimp_vector3_rotate                 (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vector,
 
1370
                                                         gdouble alpha,
 
1371
                                                         gdouble beta,
 
1372
                                                         gdouble gamma);</pre>
1458
1373
<p>
1459
1374
Rotates the <em class="parameter"><code>vector</code></em> around the three axis (Z, Y, and X) by <em class="parameter"><code>alpha</code></em>,
1460
1375
<em class="parameter"><code>beta</code></em> and <em class="parameter"><code>gamma</code></em>, respectively.
1471
1386
<col align="left" valign="top">
1472
1387
<tbody>
1473
1388
<tr>
1474
 
<td>
1475
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
1389
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
1476
1390
<td> a pointer to a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1477
1391
</td>
1478
1392
</tr>
1479
1393
<tr>
1480
 
<td>
1481
 
<span class="term"><em class="parameter"><code>alpha</code></em>&#160;:</span></td>
 
1394
<td><span class="term"><em class="parameter"><code>alpha</code></em>&#160;:</span></td>
1482
1395
<td> the angle (in radian) of rotation around the Z axis.
1483
1396
</td>
1484
1397
</tr>
1485
1398
<tr>
1486
 
<td>
1487
 
<span class="term"><em class="parameter"><code>beta</code></em>&#160;:</span></td>
 
1399
<td><span class="term"><em class="parameter"><code>beta</code></em>&#160;:</span></td>
1488
1400
<td> the angle (in radian) of rotation around the Y axis.
1489
1401
</td>
1490
1402
</tr>
1491
1403
<tr>
1492
 
<td>
1493
 
<span class="term"><em class="parameter"><code>gamma</code></em>&#160;:</span></td>
 
1404
<td><span class="term"><em class="parameter"><code>gamma</code></em>&#160;:</span></td>
1494
1405
<td> the angle (in radian) of rotation around the X axis.
1495
1406
</td>
1496
1407
</tr>
1499
1410
</div>
1500
1411
<hr>
1501
1412
<div class="refsect2" lang="en">
1502
 
<a name="id2570084"></a><h3>
 
1413
<a name="id2611910"></a><h3>
1503
1414
<a name="gimp-vector3-rotate-val"></a>gimp_vector3_rotate_val ()</h3>
1504
 
<a class="indexterm" name="id2570095"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> gimp_vector3_rotate_val         (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector,
1505
 
                                             gdouble alpha,
1506
 
                                             gdouble beta,
1507
 
                                             gdouble gamma);</pre>
 
1415
<a class="indexterm" name="id2611923"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         gimp_vector3_rotate_val             (<a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vector,
 
1416
                                                         gdouble alpha,
 
1417
                                                         gdouble beta,
 
1418
                                                         gdouble gamma);</pre>
1508
1419
<p>
1509
1420
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector3-rotate"><code class="function">gimp_vector3_rotate()</code></a> but the vectors
1510
1421
are passed by value rather than by reference.</p>
1515
1426
<col align="left" valign="top">
1516
1427
<tbody>
1517
1428
<tr>
1518
 
<td>
1519
 
<span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
 
1429
<td><span class="term"><em class="parameter"><code>vector</code></em>&#160;:</span></td>
1520
1430
<td> a <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a>.
1521
1431
</td>
1522
1432
</tr>
1523
1433
<tr>
1524
 
<td>
1525
 
<span class="term"><em class="parameter"><code>alpha</code></em>&#160;:</span></td>
 
1434
<td><span class="term"><em class="parameter"><code>alpha</code></em>&#160;:</span></td>
1526
1435
<td> the angle (in radian) of rotation around the Z axis.
1527
1436
</td>
1528
1437
</tr>
1529
1438
<tr>
1530
 
<td>
1531
 
<span class="term"><em class="parameter"><code>beta</code></em>&#160;:</span></td>
 
1439
<td><span class="term"><em class="parameter"><code>beta</code></em>&#160;:</span></td>
1532
1440
<td> the angle (in radian) of rotation around the Y axis.
1533
1441
</td>
1534
1442
</tr>
1535
1443
<tr>
1536
 
<td>
1537
 
<span class="term"><em class="parameter"><code>gamma</code></em>&#160;:</span></td>
 
1444
<td><span class="term"><em class="parameter"><code>gamma</code></em>&#160;:</span></td>
1538
1445
<td> the angle (in radian) of rotation around the X axis.
1539
1446
</td>
1540
1447
</tr>
1541
1448
<tr>
1542
 
<td>
1543
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1449
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
1544
1450
<td> the rotated vector.
1545
1451
</td>
1546
1452
</tr>
1549
1455
</div>
1550
1456
<hr>
1551
1457
<div class="refsect2" lang="en">
1552
 
<a name="id2570239"></a><h3>
 
1458
<a name="id2612068"></a><h3>
1553
1459
<a name="gimp-vector-2d-to-3d"></a>gimp_vector_2d_to_3d ()</h3>
1554
 
<a class="indexterm" name="id2570251"></a><pre class="programlisting">void        gimp_vector_2d_to_3d            (gint sx,
1555
 
                                             gint sy,
1556
 
                                             gint w,
1557
 
                                             gint h,
1558
 
                                             gint x,
1559
 
                                             gint y,
1560
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vp,
1561
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *p);</pre>
 
1460
<a class="indexterm" name="id2612082"></a><pre class="programlisting">void                gimp_vector_2d_to_3d                (gint sx,
 
1461
                                                         gint sy,
 
1462
                                                         gint w,
 
1463
                                                         gint h,
 
1464
                                                         gint x,
 
1465
                                                         gint y,
 
1466
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vp,
 
1467
                                                         <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *p);</pre>
1562
1468
<p>
1563
1469
\"Compute screen (sx, sy) - (sx + w, sy + h) to 3D unit square
1564
1470
mapping. The plane to map to is given in the z field of p. The
1575
1481
<col align="left" valign="top">
1576
1482
<tbody>
1577
1483
<tr>
1578
 
<td>
1579
 
<span class="term"><em class="parameter"><code>sx</code></em>&#160;:</span></td>
 
1484
<td><span class="term"><em class="parameter"><code>sx</code></em>&#160;:</span></td>
1580
1485
<td> the abscisse of the upper-left screen rectangle.
1581
1486
</td>
1582
1487
</tr>
1583
1488
<tr>
1584
 
<td>
1585
 
<span class="term"><em class="parameter"><code>sy</code></em>&#160;:</span></td>
 
1489
<td><span class="term"><em class="parameter"><code>sy</code></em>&#160;:</span></td>
1586
1490
<td> the ordinate of the upper-left screen rectangle.
1587
1491
</td>
1588
1492
</tr>
1589
1493
<tr>
1590
 
<td>
1591
 
<span class="term"><em class="parameter"><code>w</code></em>&#160;:</span></td>
 
1494
<td><span class="term"><em class="parameter"><code>w</code></em>&#160;:</span></td>
1592
1495
<td> the width of the screen rectangle.
1593
1496
</td>
1594
1497
</tr>
1595
1498
<tr>
1596
 
<td>
1597
 
<span class="term"><em class="parameter"><code>h</code></em>&#160;:</span></td>
 
1499
<td><span class="term"><em class="parameter"><code>h</code></em>&#160;:</span></td>
1598
1500
<td> the height of the screen rectangle.
1599
1501
</td>
1600
1502
</tr>
1601
1503
<tr>
1602
 
<td>
1603
 
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
 
1504
<td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
1604
1505
<td> the abscisse of the point in the screen rectangle to map.
1605
1506
</td>
1606
1507
</tr>
1607
1508
<tr>
1608
 
<td>
1609
 
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
 
1509
<td><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
1610
1510
<td> the ordinate of the point in the screen rectangle to map.
1611
1511
</td>
1612
1512
</tr>
1613
1513
<tr>
1614
 
<td>
1615
 
<span class="term"><em class="parameter"><code>vp</code></em>&#160;:</span></td>
 
1514
<td><span class="term"><em class="parameter"><code>vp</code></em>&#160;:</span></td>
1616
1515
<td> the position of the observer.
1617
1516
</td>
1618
1517
</tr>
1619
1518
<tr>
1620
 
<td>
1621
 
<span class="term"><em class="parameter"><code>p</code></em>&#160;:</span></td>
 
1519
<td><span class="term"><em class="parameter"><code>p</code></em>&#160;:</span></td>
1622
1520
<td> the resulting point.
1623
1521
</td>
1624
1522
</tr>
1627
1525
</div>
1628
1526
<hr>
1629
1527
<div class="refsect2" lang="en">
1630
 
<a name="id2570520"></a><h3>
 
1528
<a name="id2612353"></a><h3>
1631
1529
<a name="gimp-vector-2d-to-3d-val"></a>gimp_vector_2d_to_3d_val ()</h3>
1632
 
<a class="indexterm" name="id2570532"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> gimp_vector_2d_to_3d_val        (gint sx,
1633
 
                                             gint sy,
1634
 
                                             gint w,
1635
 
                                             gint h,
1636
 
                                             gint x,
1637
 
                                             gint y,
1638
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vp,
1639
 
                                             <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> p);</pre>
 
1530
<a class="indexterm" name="id2612367"></a><pre class="programlisting"><a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a>         gimp_vector_2d_to_3d_val            (gint sx,
 
1531
                                                         gint sy,
 
1532
                                                         gint w,
 
1533
                                                         gint h,
 
1534
                                                         gint x,
 
1535
                                                         gint y,
 
1536
                                                         <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> vp,
 
1537
                                                         <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> p);</pre>
1640
1538
<p>
1641
1539
This function is identical to <a href="libgimpmath-GimpVector.html#gimp-vector-2d-to-3d"><code class="function">gimp_vector_2d_to_3d()</code></a> but the
1642
1540
position of the <em class="parameter"><code>observer</code></em> and the resulting point <em class="parameter"><code>p</code></em> are passed by
1648
1546
<col align="left" valign="top">
1649
1547
<tbody>
1650
1548
<tr>
1651
 
<td>
1652
 
<span class="term"><em class="parameter"><code>sx</code></em>&#160;:</span></td>
 
1549
<td><span class="term"><em class="parameter"><code>sx</code></em>&#160;:</span></td>
1653
1550
<td> the abscisse of the upper-left screen rectangle.
1654
1551
</td>
1655
1552
</tr>
1656
1553
<tr>
1657
 
<td>
1658
 
<span class="term"><em class="parameter"><code>sy</code></em>&#160;:</span></td>
 
1554
<td><span class="term"><em class="parameter"><code>sy</code></em>&#160;:</span></td>
1659
1555
<td> the ordinate of the upper-left screen rectangle.
1660
1556
</td>
1661
1557
</tr>
1662
1558
<tr>
1663
 
<td>
1664
 
<span class="term"><em class="parameter"><code>w</code></em>&#160;:</span></td>
 
1559
<td><span class="term"><em class="parameter"><code>w</code></em>&#160;:</span></td>
1665
1560
<td> the width of the screen rectangle.
1666
1561
</td>
1667
1562
</tr>
1668
1563
<tr>
1669
 
<td>
1670
 
<span class="term"><em class="parameter"><code>h</code></em>&#160;:</span></td>
 
1564
<td><span class="term"><em class="parameter"><code>h</code></em>&#160;:</span></td>
1671
1565
<td> the height of the screen rectangle.
1672
1566
</td>
1673
1567
</tr>
1674
1568
<tr>
1675
 
<td>
1676
 
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
 
1569
<td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
1677
1570
<td> the abscisse of the point in the screen rectangle to map.
1678
1571
</td>
1679
1572
</tr>
1680
1573
<tr>
1681
 
<td>
1682
 
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
 
1574
<td><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
1683
1575
<td> the ordinate of the point in the screen rectangle to map.
1684
1576
</td>
1685
1577
</tr>
1686
1578
<tr>
1687
 
<td>
1688
 
<span class="term"><em class="parameter"><code>vp</code></em>&#160;:</span></td>
 
1579
<td><span class="term"><em class="parameter"><code>vp</code></em>&#160;:</span></td>
1689
1580
<td> position of the observer.
1690
1581
</td>
1691
1582
</tr>
1692
1583
<tr>
1693
 
<td>
1694
 
<span class="term"><em class="parameter"><code>p</code></em>&#160;:</span></td>
 
1584
<td><span class="term"><em class="parameter"><code>p</code></em>&#160;:</span></td>
1695
1585
<td> the resulting point.
1696
1586
</td>
1697
1587
</tr>
1698
1588
<tr>
1699
 
<td>
1700
 
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
1589
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
1701
1590
<td> the computed <a href="libgimpmath-GimpVector.html#GimpVector3"><span class="type">GimpVector3</span></a> point.
1702
1591
</td>
1703
1592
</tr>
1706
1595
</div>
1707
1596
<hr>
1708
1597
<div class="refsect2" lang="en">
1709
 
<a name="id2570774"></a><h3>
 
1598
<a name="id2612611"></a><h3>
1710
1599
<a name="gimp-vector-3d-to-2d"></a>gimp_vector_3d_to_2d ()</h3>
1711
 
<a class="indexterm" name="id2570785"></a><pre class="programlisting">void        gimp_vector_3d_to_2d            (gint sx,
1712
 
                                             gint sy,
1713
 
                                             gint w,
1714
 
                                             gint h,
1715
 
                                             gdouble *x,
1716
 
                                             gdouble *y,
1717
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vp,
1718
 
                                             const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *p);</pre>
 
1600
<a class="indexterm" name="id2612625"></a><pre class="programlisting">void                gimp_vector_3d_to_2d                (gint sx,
 
1601
                                                         gint sy,
 
1602
                                                         gint w,
 
1603
                                                         gint h,
 
1604
                                                         gdouble *x,
 
1605
                                                         gdouble *y,
 
1606
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *vp,
 
1607
                                                         const <a href="libgimpmath-GimpVector.html#GimpVector3">GimpVector3</a> *p);</pre>
1719
1608
<p>
1720
1609
Convert the given 3D point to 2D (project it onto the viewing
1721
1610
plane, (sx, sy, 0) - (sx + w, sy + h, 0). The input is assumed to
1731
1620
<col align="left" valign="top">
1732
1621
<tbody>
1733
1622
<tr>
1734
 
<td>
1735
 
<span class="term"><em class="parameter"><code>sx</code></em>&#160;:</span></td>
 
1623
<td><span class="term"><em class="parameter"><code>sx</code></em>&#160;:</span></td>
1736
1624
<td> the abscisse of the upper-left screen rectangle.
1737
1625
</td>
1738
1626
</tr>
1739
1627
<tr>
1740
 
<td>
1741
 
<span class="term"><em class="parameter"><code>sy</code></em>&#160;:</span></td>
 
1628
<td><span class="term"><em class="parameter"><code>sy</code></em>&#160;:</span></td>
1742
1629
<td> the ordinate of the upper-left screen rectangle.
1743
1630
</td>
1744
1631
</tr>
1745
1632
<tr>
1746
 
<td>
1747
 
<span class="term"><em class="parameter"><code>w</code></em>&#160;:</span></td>
 
1633
<td><span class="term"><em class="parameter"><code>w</code></em>&#160;:</span></td>
1748
1634
<td> the width of the screen rectangle.
1749
1635
</td>
1750
1636
</tr>
1751
1637
<tr>
1752
 
<td>
1753
 
<span class="term"><em class="parameter"><code>h</code></em>&#160;:</span></td>
 
1638
<td><span class="term"><em class="parameter"><code>h</code></em>&#160;:</span></td>
1754
1639
<td> the height of the screen rectangle.
1755
1640
</td>
1756
1641
</tr>
1757
1642
<tr>
1758
 
<td>
1759
 
<span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
 
1643
<td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
1760
1644
<td> the abscisse of the point in the screen rectangle to map (return value).
1761
1645
</td>
1762
1646
</tr>
1763
1647
<tr>
1764
 
<td>
1765
 
<span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
 
1648
<td><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
1766
1649
<td> the ordinate of the point in the screen rectangle to map (return value).
1767
1650
</td>
1768
1651
</tr>
1769
1652
<tr>
1770
 
<td>
1771
 
<span class="term"><em class="parameter"><code>vp</code></em>&#160;:</span></td>
 
1653
<td><span class="term"><em class="parameter"><code>vp</code></em>&#160;:</span></td>
1772
1654
<td> position of the observer.
1773
1655
</td>
1774
1656
</tr>
1775
1657
<tr>
1776
 
<td>
1777
 
<span class="term"><em class="parameter"><code>p</code></em>&#160;:</span></td>
 
1658
<td><span class="term"><em class="parameter"><code>p</code></em>&#160;:</span></td>
1778
1659
<td> the 3D point to project to the plane.
1779
1660
</td>
1780
1661
</tr>
1783
1664
</div>
1784
1665
</div>
1785
1666
<div class="refsect1" lang="en">
1786
 
<a name="id2571006"></a><h2>See Also</h2>
 
1667
<a name="id2612848"></a><h2>See Also</h2>
1787
1668
<p>
1788
1669
<a href="libgimpmath-GimpMatrix.html#GimpMatrix3"><span class="type">GimpMatrix3</span></a>
1789
1670
</p>
1792
1673
</p>
1793
1674
</div>
1794
1675
</div>
1795
 
<table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle">
1796
 
<td align="left"><a accesskey="p" href="libgimpmath-GimpMatrix.html"><b>&lt;&lt;&#160;GimpMatrix</b></a></td>
1797
 
<td align="right"><a accesskey="n" href="libgimpmath-GimpMD5.html"><b>GimpMD5&#160;&gt;&gt;</b></a></td>
1798
 
</tr></table>
1799
1676
</body>
1800
1677
</html>