annotate docs/ref/math.html @ 3172:d1b367fc08bc tests-returncode

Use a return code of 1 when the tests fail.
author Thomas Kluyver <takowl@gmail.com>
date Wed, 09 Jan 2013 10:13:57 +0000
parents 0a3be7313aa4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1996
04461b5e6bb9 added missing documentation files from the math module
lorenz
parents:
diff changeset
3
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
4 <html xmlns="http://www.w3.org/1999/xhtml">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
5 <head>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
7
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
8 <title>pygame.math &mdash; Pygame v1.9.2 documentation</title>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
9 <link rel="stylesheet" href="../_static/pygame.css" type="text/css" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
10 <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
11 <script type="text/javascript">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
12 var DOCUMENTATION_OPTIONS = {
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
13 URL_ROOT: '../',
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
14 VERSION: '1.9.2',
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
15 COLLAPSE_INDEX: false,
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
16 FILE_SUFFIX: '.html',
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
17 HAS_SOURCE: true
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
18 };
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
19 </script>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
20 <script type="text/javascript" src="../_static/jquery.js"></script>
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
21 <script type="text/javascript" src="../_static/underscore.js"></script>
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
22 <script type="text/javascript" src="../_static/doctools.js"></script>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
23 <link rel="shortcut icon" href="../_static/pygame.ico"/>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
24 <link rel="top" title="Pygame v1.9.2 documentation" href="../index.html" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
25 <link rel="next" title="pygame.midi" href="midi.html" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
26 <link rel="prev" title="pygame.mask" href="mask.html" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
27 </head>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
28 <body>
1996
04461b5e6bb9 added missing documentation files from the math module
lorenz
parents:
diff changeset
29
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
30 <div class="document">
1996
04461b5e6bb9 added missing documentation files from the math module
lorenz
parents:
diff changeset
31
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
32 <div class="header">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
33 <table>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
34 <tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
35 <td class="logo">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
36 <a href="http://www.pygame.org/">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
37 <img src="../_static/pygame_tiny.png"/>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
38 </a>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
39 <h5>pygame documentation</h5>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
40 </td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
41 <td class="pagelinks">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
42 <p class="top">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
43 ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
44 <a href="http://www.pygame.org/">Pygame Home</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
45 <a href="../index.html">Help Contents</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
46 <a href="../genindex.html">Reference Index</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
47 </p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
48 <p class="bottom">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
49 <a href="camera.html">camera</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
50 <a href="cdrom.html">cdrom</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
51 <a href="color.html">Color</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
52 <a href="cursors.html">cursors</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
53 <a href="display.html">display</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
54 <a href="draw.html">draw</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
55 <a href="event.html">event</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
56 <a href="examples.html">examples</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
57 <a href="font.html">font</a> ||
3065
0a3be7313aa4 Enable pygame._freetype extension module build by default
Lenard Lindstrom <len-l@telus.net>
parents: 2239
diff changeset
58 <a href="freetype.html">freetype</a> ||
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
59 <a href="gfxdraw.html">gfxdraw</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
60 <a href="image.html">image</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
61 <a href="joystick.html">joystick</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
62 <a href="key.html">key</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
63 <a href="locals.html">locals</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
64 <a href="mask.html">mask</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
65 <a href="math.html">math</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
66 <a href="midi.html">midi</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
67 <a href="mixer.html">mixer</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
68 <a href="mouse.html">mouse</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
69 <a href="movie.html">movie</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
70 <a href="music.html">music</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
71 <a href="overlay.html">Overlay</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
72 <a href="pixelarray.html">PixelArray</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
73 <a href="pixelcopy.html">pixelcopy</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
74 <a href="pygame.html">pygame</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
75 <a href="rect.html">Rect</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
76 <a href="scrap.html">scrap</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
77 <a href="sndarray.html">sndarray</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
78 <a href="sprite.html">sprite</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
79 <a href="surface.html">Surface</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
80 <a href="surfarray.html">surfarray</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
81 <a href="tests.html">tests</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
82 <a href="time.html">time</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
83 <a href="transform.html">transform</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
84 <a href="pygame.html#module-pygame.version">version</a>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
85 </p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
86 </td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
87 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
88 </table>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
89 </div>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
90
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
91 <div class="documentwrapper">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
92 <div class="body">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
93
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
94 <div class="sectionwrapper">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
95 <div class="section" id="module-pygame.math">
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
96 <span id="pygame-math"></span><dl class="definition module">
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
97 <dt class="title module">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
98 <tt class="docutils literal"><span class="pre">pygame.math</span></tt></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
99 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
100 <div class="line"><span class="summaryline">pygame module for vector classes</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
101 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
102 <table border="1" class="toc docutils">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
103 <colgroup>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
104 <col width="38%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
105 <col width="1%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
106 <col width="61%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
107 </colgroup>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
108 <tbody valign="top">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
109 <tr><td><a class="toc reference external" href="math.html#pygame.math.enable_swizzling">pygame.math.enable_swizzling</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
110 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
111 <td>globally enables swizzling for vectors.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
112 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
113 <tr><td><a class="toc reference external" href="math.html#pygame.math.disable_swizzling">pygame.math.disable_swizzling</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
114 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
115 <td>globally disables swizzling for vectors.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
116 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
117 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2">pygame.math.Vector2</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
118 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
119 <td>a 2-Dimensional Vector</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
120 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
121 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3">pygame.math.Vector3</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
122 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
123 <td>a 3-Dimensional Vector</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
124 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
125 </tbody>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
126 </table>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
127 <p>!!!EXPERIMENTAL!!! Note: This Modul is still in development and the <tt class="docutils literal"><span class="pre">API</span></tt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
128 might change. Please report bug and suggestions to <a class="reference external" href="mailto:pygame-users&#37;&#52;&#48;seul&#46;org">pygame-users<span>&#64;</span>seul<span>&#46;</span>org</a></p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
129 <p>The pygame math module currently provides Vector classes in two and three
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
130 dimensions, Vector2 and Vector3 respectively.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
131 <p>They support the following numerical operations: vec+vec, vec-vec, vec*number,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
132 number*vec, vec/number, vec//number, vec+=vec, vec-=vec, vec*=number,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
133 vec/=number, vec//=number. All these operations will be performed elementwise.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
134 In addition vec*vec will perform a scalar-product (a.k.a. dot-product). If you
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
135 want to multiply every element from vector v with every element from vector w
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
136 you can use the elementwise method: <tt class="docutils literal"><span class="pre">v.elementwise()</span></tt> <tt class="docutils literal"><span class="pre">\*</span></tt> w</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
137 <p>New in Pygame 1.10</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
138 <dl class="definition function">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
139 <dt class="title" id="pygame.math.enable_swizzling">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
140 <tt class="descclassname">pygame.math.</tt><tt class="descname">enable_swizzling</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.enable_swizzling" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
141 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
142 <div class="line"><span class="summaryline">globally enables swizzling for vectors.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
143 <div class="line"><span class="signature">enable_swizzling() -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
144 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
145 <p>Enables swizzling for all vectors until <tt class="docutils literal"><span class="pre">disable_swizzling()</span></tt> is called.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
146 By default swizzling is disabled.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
147 </dd></dl>
1996
04461b5e6bb9 added missing documentation files from the math module
lorenz
parents:
diff changeset
148
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
149 <dl class="definition function">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
150 <dt class="title" id="pygame.math.disable_swizzling">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
151 <tt class="descclassname">pygame.math.</tt><tt class="descname">disable_swizzling</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.disable_swizzling" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
152 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
153 <div class="line"><span class="summaryline">globally disables swizzling for vectors.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
154 <div class="line"><span class="signature">disable_swizzling() -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
155 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
156 <p>Disables swizzling for all vectors until <tt class="docutils literal"><span class="pre">enable_swizzling()</span></tt> is called.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
157 By default swizzling is disabled.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
158 </dd></dl>
1996
04461b5e6bb9 added missing documentation files from the math module
lorenz
parents:
diff changeset
159
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
160 <dl class="definition class">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
161 <dt class="title" id="pygame.math.Vector2">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
162 <em class="property">class </em><tt class="descclassname">pygame.math.</tt><tt class="descname">Vector2</tt><a class="headerlink" href="#pygame.math.Vector2" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
163 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
164 <div class="line"><span class="summaryline">a 2-Dimensional Vector</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
165 <div class="line"><span class="signature">Vector2() -&gt; Vector2</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
166 <div class="line"><span class="signature">Vector2(Vector2) -&gt; Vector2</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
167 <div class="line"><span class="signature">Vector2(x, y) -&gt; Vector2</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
168 <div class="line"><span class="signature">Vector2((x, y)) -&gt; Vector2</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
169 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
170 <table border="1" class="toc docutils">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
171 <colgroup>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
172 <col width="37%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
173 <col width="1%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
174 <col width="62%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
175 </colgroup>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
176 <tbody valign="top">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
177 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.dot">pygame.math.Vector2.dot</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
178 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
179 <td>calculates the dot- or scalar-product with the other vector</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
180 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
181 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.cross">pygame.math.Vector2.cross</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
182 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
183 <td>calculates the cross- or vector-product</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
184 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
185 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.length">pygame.math.Vector2.length</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
186 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
187 <td>returns the euclidic length of the vector.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
188 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
189 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.length_squared">pygame.math.Vector2.length_squared</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
190 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
191 <td>returns the squared euclidic length of the vector.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
192 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
193 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.normalize">pygame.math.Vector2.normalize</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
194 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
195 <td>returns a vector with the same direction but length 1.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
196 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
197 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.normalize_ip">pygame.math.Vector2.normalize_ip</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
198 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
199 <td>normalizes the vector in place so that its length is 1.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
200 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
201 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.is_normalized">pygame.math.Vector2.is_normalized</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
202 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
203 <td>tests if the vector is normalized i.e. has length == 1.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
204 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
205 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.scale_to_length">pygame.math.Vector2.scale_to_length</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
206 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
207 <td>scales the vector to a given length.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
208 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
209 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.reflect">pygame.math.Vector2.reflect</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
210 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
211 <td>returns a vector reflected of a given normal.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
212 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
213 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.reflect_ip">pygame.math.Vector2.reflect_ip</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
214 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
215 <td>reflect the vector of a given normal in place.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
216 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
217 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.distance_to">pygame.math.Vector2.distance_to</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
218 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
219 <td>calculates the euclidic distance to a given vector.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
220 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
221 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.distance_squared_to">pygame.math.Vector2.distance_squared_to</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
222 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
223 <td>calculates the squared euclidic distance to a given vector.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
224 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
225 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.lerp">pygame.math.Vector2.lerp</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
226 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
227 <td>returns a linear interpolation to the given vector.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
228 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
229 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.slerp">pygame.math.Vector2.slerp</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
230 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
231 <td>returns a spherical interpolation to the given vector.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
232 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
233 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.elementwise">pygame.math.Vector2.elementwise</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
234 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
235 <td>The next operation will be performed elementwize.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
236 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
237 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.rotate">pygame.math.Vector2.rotate</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
238 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
239 <td>rotates a vector by a given angle in degrees.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
240 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
241 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.rotate_ip">pygame.math.Vector2.rotate_ip</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
242 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
243 <td>rotates the vector by a given angle in degrees in place.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
244 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
245 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.angle_to">pygame.math.Vector2.angle_to</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
246 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
247 <td>calculates the angle to a given vector in degrees.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
248 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
249 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.as_polar">pygame.math.Vector2.as_polar</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
250 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
251 <td>returns a tuple with radial distance and azimuthal angle.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
252 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
253 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector2.from_polar">pygame.math.Vector2.from_polar</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
254 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
255 <td>Sets x and y from a polar coordinates tuple.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
256 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
257 </tbody>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
258 </table>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
259 <p>Some general information about the Vector2 class.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
260 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
261 <dt class="title" id="pygame.math.Vector2.dot">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
262 <tt class="descname">dot</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.dot" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
263 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
264 <div class="line"><span class="summaryline">calculates the dot- or scalar-product with the other vector</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
265 <div class="line"><span class="signature">dot(Vector2) -&gt; float</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
266 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
267 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
268
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
269 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
270 <dt class="title" id="pygame.math.Vector2.cross">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
271 <tt class="descname">cross</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.cross" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
272 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
273 <div class="line"><span class="summaryline">calculates the cross- or vector-product</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
274 <div class="line"><span class="signature">cross(Vector2) -&gt; float</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
275 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
276 <p>calculates the third component of the cross-product.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
277 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
278
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
279 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
280 <dt class="title" id="pygame.math.Vector2.length">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
281 <tt class="descname">length</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.length" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
282 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
283 <div class="line"><span class="summaryline">returns the euclidic length of the vector.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
284 <div class="line"><span class="signature">length() -&gt; float</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
285 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
286 <p>calculates the euclidic length of the vector which follows from the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
287 Pythagorean theorem: <tt class="docutils literal"><span class="pre">vec.length()</span></tt> ==
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
288 <tt class="docutils literal"><span class="pre">math.sqrt(vec.x**2</span> <span class="pre">+</span> <span class="pre">vec.y**2)</span></tt></p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
289 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
290
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
291 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
292 <dt class="title" id="pygame.math.Vector2.length_squared">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
293 <tt class="descname">length_squared</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.length_squared" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
294 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
295 <div class="line"><span class="summaryline">returns the squared euclidic length of the vector.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
296 <div class="line"><span class="signature">length_squared() -&gt; float</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
297 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
298 <p>calculates the euclidic length of the vector which follows from the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
299 Pythagorean theorem: <tt class="docutils literal"><span class="pre">vec.length_squared()</span></tt> == vec.x**2 + vec.y**2 This
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
300 is faster than <tt class="docutils literal"><span class="pre">vec.length()</span></tt> because it avoids the square root.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
301 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
302
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
303 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
304 <dt class="title" id="pygame.math.Vector2.normalize">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
305 <tt class="descname">normalize</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.normalize" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
306 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
307 <div class="line"><span class="summaryline">returns a vector with the same direction but length 1.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
308 <div class="line"><span class="signature">normalize() -&gt; Vector2</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
309 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
310 <p>Returns a new vector that has length == 1 and the same direction as self.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
311 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
312
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
313 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
314 <dt class="title" id="pygame.math.Vector2.normalize_ip">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
315 <tt class="descname">normalize_ip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.normalize_ip" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
316 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
317 <div class="line"><span class="summaryline">normalizes the vector in place so that its length is 1.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
318 <div class="line"><span class="signature">normalize_ip() -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
319 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
320 <p>Normalizes the vector so that it has length == 1. The direction of the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
321 vector is not changed.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
322 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
323
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
324 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
325 <dt class="title" id="pygame.math.Vector2.is_normalized">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
326 <tt class="descname">is_normalized</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.is_normalized" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
327 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
328 <div class="line"><span class="summaryline">tests if the vector is normalized i.e. has length == 1.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
329 <div class="line"><span class="signature">is_normalized() -&gt; Bool</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
330 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
331 <p>Returns True if the vector has length == 1. Otherwise it returns False.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
332 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
333
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
334 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
335 <dt class="title" id="pygame.math.Vector2.scale_to_length">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
336 <tt class="descname">scale_to_length</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.scale_to_length" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
337 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
338 <div class="line"><span class="summaryline">scales the vector to a given length.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
339 <div class="line"><span class="signature">scale_to_length(float) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
340 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
341 <p>Scales the vector so that it has the given length. The direction of the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
342 vector is not changed. You can also scale to length 0. If the vector is
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
343 the zero vector (i.e. has length 0 thus no direction) an
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
344 ZeroDivisionError is raised.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
345 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
346
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
347 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
348 <dt class="title" id="pygame.math.Vector2.reflect">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
349 <tt class="descname">reflect</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.reflect" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
350 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
351 <div class="line"><span class="summaryline">returns a vector reflected of a given normal.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
352 <div class="line"><span class="signature">reflect(Vector2) -&gt; Vector2</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
353 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
354 <p>Returns a new vector that points in the direction as if self would bounce
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
355 of a surface characterized by the given surface normal. The length of the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
356 new vector is the same as self&#8217;s.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
357 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
358
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
359 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
360 <dt class="title" id="pygame.math.Vector2.reflect_ip">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
361 <tt class="descname">reflect_ip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.reflect_ip" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
362 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
363 <div class="line"><span class="summaryline">reflect the vector of a given normal in place.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
364 <div class="line"><span class="signature">reflect_ip(Vector2) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
365 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
366 <p>Changes the direction of self as if it would have been reflected of a
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
367 surface with the given surface normal.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
368 </dd></dl>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
369
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
370 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
371 <dt class="title" id="pygame.math.Vector2.distance_to">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
372 <tt class="descname">distance_to</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.distance_to" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
373 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
374 <div class="line"><span class="summaryline">calculates the euclidic distance to a given vector.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
375 <div class="line"><span class="signature">distance_to(Vector2) -&gt; float</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
376 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
377 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
378
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
379 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
380 <dt class="title" id="pygame.math.Vector2.distance_squared_to">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
381 <tt class="descname">distance_squared_to</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.distance_squared_to" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
382 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
383 <div class="line"><span class="summaryline">calculates the squared euclidic distance to a given vector.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
384 <div class="line"><span class="signature">distance_squared_to(Vector2) -&gt; float</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
385 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
386 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
387
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
388 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
389 <dt class="title" id="pygame.math.Vector2.lerp">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
390 <tt class="descname">lerp</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.lerp" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
391 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
392 <div class="line"><span class="summaryline">returns a linear interpolation to the given vector.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
393 <div class="line"><span class="signature">lerp(Vector2, float) -&gt; Vector2</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
394 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
395 <p>Returns a Vector which is a linear interpolation between self and the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
396 given Vector. The second parameter determines how far between self an
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
397 other the result is going to be. It must be a value between 0 and 1 where
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
398 0 means self an 1 means other will be returned.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
399 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
400
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
401 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
402 <dt class="title" id="pygame.math.Vector2.slerp">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
403 <tt class="descname">slerp</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.slerp" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
404 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
405 <div class="line"><span class="summaryline">returns a spherical interpolation to the given vector.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
406 <div class="line"><span class="signature">slerp(Vector2, float) -&gt; Vector2</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
407 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
408 <p>Calculates the spherical interpolation from self to the given Vector. The
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
409 second argument - often called t - must be in the range [-1, 1]. It
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
410 parametrizes where - in between the two vectors - the result should be.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
411 If a negative value is given the interpolation will not take the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
412 complement of the shortest path.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
413 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
414
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
415 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
416 <dt class="title" id="pygame.math.Vector2.elementwise">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
417 <tt class="descname">elementwise</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.elementwise" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
418 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
419 <div class="line"><span class="summaryline">The next operation will be performed elementwize.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
420 <div class="line"><span class="signature">elementwise() -&gt; VectorElementwizeProxy</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
421 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
422 <p>Applies the following operation to each element of the vector.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
423 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
424
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
425 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
426 <dt class="title" id="pygame.math.Vector2.rotate">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
427 <tt class="descname">rotate</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.rotate" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
428 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
429 <div class="line"><span class="summaryline">rotates a vector by a given angle in degrees.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
430 <div class="line"><span class="signature">rotate(float) -&gt; Vector2</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
431 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
432 <p>Returns a vector which has the same length as self but is rotated
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
433 counterclockwise by the given angle in degrees.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
434 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
435
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
436 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
437 <dt class="title" id="pygame.math.Vector2.rotate_ip">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
438 <tt class="descname">rotate_ip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.rotate_ip" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
439 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
440 <div class="line"><span class="summaryline">rotates the vector by a given angle in degrees in place.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
441 <div class="line"><span class="signature">rotate_ip(float) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
442 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
443 <p>Rotates the vector counterclockwise by the given angle in degrees. The
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
444 length of the vector is not changed.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
445 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
446
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
447 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
448 <dt class="title" id="pygame.math.Vector2.angle_to">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
449 <tt class="descname">angle_to</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.angle_to" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
450 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
451 <div class="line"><span class="summaryline">calculates the angle to a given vector in degrees.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
452 <div class="line"><span class="signature">angle_to(Vector2) -&gt; float</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
453 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
454 <p>Returns the angle between self and the given vector.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
455 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
456
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
457 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
458 <dt class="title" id="pygame.math.Vector2.as_polar">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
459 <tt class="descname">as_polar</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.as_polar" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
460 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
461 <div class="line"><span class="summaryline">returns a tuple with radial distance and azimuthal angle.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
462 <div class="line"><span class="signature">as_polar() -&gt; (r, phi)</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
463 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
464 <p>Returns a tuple (r, phi) where r is the radial distance, and phi is the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
465 azimuthal angle.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
466 </dd></dl>
1996
04461b5e6bb9 added missing documentation files from the math module
lorenz
parents:
diff changeset
467
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
468 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
469 <dt class="title" id="pygame.math.Vector2.from_polar">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
470 <tt class="descname">from_polar</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector2.from_polar" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
471 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
472 <div class="line"><span class="summaryline">Sets x and y from a polar coordinates tuple.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
473 <div class="line"><span class="signature">from_polar((r, phi)) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
474 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
475 <p>Sets x and y from a tuple (r, phi) where r is the radial distance, and
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
476 phi is the azimuthal angle.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
477 </dd></dl>
1996
04461b5e6bb9 added missing documentation files from the math module
lorenz
parents:
diff changeset
478
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
479 </dd></dl>
1996
04461b5e6bb9 added missing documentation files from the math module
lorenz
parents:
diff changeset
480
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
481 <dl class="definition class">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
482 <dt class="title" id="pygame.math.Vector3">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
483 <em class="property">class </em><tt class="descclassname">pygame.math.</tt><tt class="descname">Vector3</tt><a class="headerlink" href="#pygame.math.Vector3" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
484 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
485 <div class="line"><span class="summaryline">a 3-Dimensional Vector</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
486 <div class="line"><span class="signature">Vector3() -&gt; Vector3</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
487 <div class="line"><span class="signature">Vector3(Vector3) -&gt; Vector3</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
488 <div class="line"><span class="signature">Vector3(x, y, z) -&gt; Vector3</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
489 <div class="line"><span class="signature">Vector3((x, y, z)) -&gt; Vector3</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
490 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
491 <table border="1" class="toc docutils">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
492 <colgroup>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
493 <col width="34%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
494 <col width="1%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
495 <col width="66%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
496 </colgroup>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
497 <tbody valign="top">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
498 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.dot">pygame.math.Vector3.dot</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
499 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
500 <td>calculates the dot- or scalar-product with the other vector</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
501 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
502 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.cross">pygame.math.Vector3.cross</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
503 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
504 <td>calculates the cross- or vector-product</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
505 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
506 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.length">pygame.math.Vector3.length</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
507 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
508 <td>returns the euclidic length of the vector.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
509 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
510 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.length_squared">pygame.math.Vector3.length_squared</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
511 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
512 <td>returns the squared euclidic length of the vector.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
513 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
514 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.normalize">pygame.math.Vector3.normalize</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
515 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
516 <td>returns a vector with the same direction but length 1.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
517 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
518 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.normalize_ip">pygame.math.Vector3.normalize_ip</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
519 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
520 <td>normalizes the vector in place so that its length is 1.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
521 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
522 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.is_normalized">pygame.math.Vector3.is_normalized</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
523 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
524 <td>tests if the vector is normalized i.e. has length == 1.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
525 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
526 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.scale_to_length">pygame.math.Vector3.scale_to_length</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
527 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
528 <td>scales the vector to a given length.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
529 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
530 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.reflect">pygame.math.Vector3.reflect</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
531 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
532 <td>returns a vector reflected of a given normal.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
533 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
534 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.reflect_ip">pygame.math.Vector3.reflect_ip</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
535 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
536 <td>reflect the vector of a given normal in place.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
537 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
538 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.distance_to">pygame.math.Vector3.distance_to</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
539 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
540 <td>calculates the euclidic distance to a given vector.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
541 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
542 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.distance_squared_to">pygame.math.Vector3.distance_squared_to</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
543 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
544 <td>calculates the squared euclidic distance to a given vector.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
545 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
546 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.lerp">pygame.math.Vector3.lerp</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
547 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
548 <td>returns a linear interpolation to the given vector.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
549 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
550 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.slerp">pygame.math.Vector3.slerp</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
551 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
552 <td>returns a spherical interpolation to the given vector.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
553 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
554 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.elementwise">pygame.math.Vector3.elementwise</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
555 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
556 <td>The next operation will be performed elementwize.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
557 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
558 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.rotate">pygame.math.Vector3.rotate</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
559 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
560 <td>rotates a vector by a given angle in degrees.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
561 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
562 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.rotate_ip">pygame.math.Vector3.rotate_ip</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
563 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
564 <td>rotates the vector by a given angle in degrees in place.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
565 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
566 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.rotate_x">pygame.math.Vector3.rotate_x</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
567 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
568 <td>rotates a vector around the x-axis by the angle in degrees.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
569 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
570 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.rotate_x_ip">pygame.math.Vector3.rotate_x_ip</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
571 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
572 <td>rotates the vector around the x-axis by the angle in degrees in place.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
573 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
574 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.rotate_y">pygame.math.Vector3.rotate_y</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
575 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
576 <td>rotates a vector around the y-axis by the angle in degrees.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
577 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
578 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.rotate_y_ip">pygame.math.Vector3.rotate_y_ip</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
579 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
580 <td>rotates the vector around the y-axis by the angle in degrees in place.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
581 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
582 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.rotate_z">pygame.math.Vector3.rotate_z</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
583 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
584 <td>rotates a vector around the z-axis by the angle in degrees.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
585 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
586 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.rotate_z_ip">pygame.math.Vector3.rotate_z_ip</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
587 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
588 <td>rotates the vector around the z-axis by the angle in degrees in place.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
589 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
590 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.angle_to">pygame.math.Vector3.angle_to</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
591 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
592 <td>calculates the angle to a given vector in degrees.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
593 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
594 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.as_spherical">pygame.math.Vector3.as_spherical</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
595 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
596 <td>returns a tuple with radial distance, inclination and azimuthal angle.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
597 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
598 <tr><td><a class="toc reference external" href="math.html#pygame.math.Vector3.from_spherical">pygame.math.Vector3.from_spherical</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
599 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
600 <td>Sets x, y and z from a spherical coordinates 3-tuple.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
601 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
602 </tbody>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
603 </table>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
604 <p>Some general information about the Vector3 class.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
605 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
606 <dt class="title" id="pygame.math.Vector3.dot">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
607 <tt class="descname">dot</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.dot" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
608 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
609 <div class="line"><span class="summaryline">calculates the dot- or scalar-product with the other vector</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
610 <div class="line"><span class="signature">dot(Vector3) -&gt; float</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
611 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
612 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
613
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
614 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
615 <dt class="title" id="pygame.math.Vector3.cross">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
616 <tt class="descname">cross</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.cross" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
617 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
618 <div class="line"><span class="summaryline">calculates the cross- or vector-product</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
619 <div class="line"><span class="signature">cross(Vector3) -&gt; float</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
620 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
621 <p>calculates the cross-product.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
622 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
623
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
624 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
625 <dt class="title" id="pygame.math.Vector3.length">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
626 <tt class="descname">length</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.length" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
627 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
628 <div class="line"><span class="summaryline">returns the euclidic length of the vector.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
629 <div class="line"><span class="signature">length() -&gt; float</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
630 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
631 <p>calculates the euclidic length of the vector which follows from the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
632 Pythagorean theorem: <tt class="docutils literal"><span class="pre">vec.length()</span></tt> ==
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
633 <tt class="docutils literal"><span class="pre">math.sqrt(vec.x**2</span> <span class="pre">+</span> <span class="pre">vec.y**2</span> <span class="pre">+</span> <span class="pre">vec.z**2)</span></tt></p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
634 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
635
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
636 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
637 <dt class="title" id="pygame.math.Vector3.length_squared">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
638 <tt class="descname">length_squared</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.length_squared" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
639 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
640 <div class="line"><span class="summaryline">returns the squared euclidic length of the vector.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
641 <div class="line"><span class="signature">length_squared() -&gt; float</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
642 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
643 <p>calculates the euclidic length of the vector which follows from the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
644 Pythagorean theorem: <tt class="docutils literal"><span class="pre">vec.length_squared()</span></tt> == vec.x**2 + vec.y**2 +
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
645 vec.z**2 This is faster than <tt class="docutils literal"><span class="pre">vec.length()</span></tt> because it avoids the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
646 square root.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
647 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
648
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
649 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
650 <dt class="title" id="pygame.math.Vector3.normalize">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
651 <tt class="descname">normalize</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.normalize" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
652 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
653 <div class="line"><span class="summaryline">returns a vector with the same direction but length 1.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
654 <div class="line"><span class="signature">normalize() -&gt; Vector3</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
655 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
656 <p>Returns a new vector that has length == 1 and the same direction as self.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
657 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
658
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
659 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
660 <dt class="title" id="pygame.math.Vector3.normalize_ip">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
661 <tt class="descname">normalize_ip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.normalize_ip" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
662 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
663 <div class="line"><span class="summaryline">normalizes the vector in place so that its length is 1.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
664 <div class="line"><span class="signature">normalize_ip() -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
665 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
666 <p>Normalizes the vector so that it has length == 1. The direction of the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
667 vector is not changed.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
668 </dd></dl>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
669
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
670 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
671 <dt class="title" id="pygame.math.Vector3.is_normalized">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
672 <tt class="descname">is_normalized</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.is_normalized" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
673 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
674 <div class="line"><span class="summaryline">tests if the vector is normalized i.e. has length == 1.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
675 <div class="line"><span class="signature">is_normalized() -&gt; Bool</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
676 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
677 <p>Returns True if the vector has length == 1. Otherwise it returns False.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
678 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
679
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
680 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
681 <dt class="title" id="pygame.math.Vector3.scale_to_length">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
682 <tt class="descname">scale_to_length</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.scale_to_length" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
683 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
684 <div class="line"><span class="summaryline">scales the vector to a given length.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
685 <div class="line"><span class="signature">scale_to_length(float) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
686 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
687 <p>Scales the vector so that it has the given length. The direction of the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
688 vector is not changed. You can also scale to length 0. If the vector is
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
689 the zero vector (i.e. has length 0 thus no direction) an
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
690 ZeroDivisionError is raised.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
691 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
692
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
693 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
694 <dt class="title" id="pygame.math.Vector3.reflect">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
695 <tt class="descname">reflect</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.reflect" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
696 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
697 <div class="line"><span class="summaryline">returns a vector reflected of a given normal.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
698 <div class="line"><span class="signature">reflect(Vector3) -&gt; Vector3</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
699 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
700 <p>Returns a new vector that points in the direction as if self would bounce
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
701 of a surface characterized by the given surface normal. The length of the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
702 new vector is the same as self&#8217;s.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
703 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
704
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
705 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
706 <dt class="title" id="pygame.math.Vector3.reflect_ip">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
707 <tt class="descname">reflect_ip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.reflect_ip" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
708 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
709 <div class="line"><span class="summaryline">reflect the vector of a given normal in place.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
710 <div class="line"><span class="signature">reflect_ip(Vector3) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
711 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
712 <p>Changes the direction of self as if it would have been reflected of a
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
713 surface with the given surface normal.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
714 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
715
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
716 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
717 <dt class="title" id="pygame.math.Vector3.distance_to">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
718 <tt class="descname">distance_to</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.distance_to" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
719 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
720 <div class="line"><span class="summaryline">calculates the euclidic distance to a given vector.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
721 <div class="line"><span class="signature">distance_to(Vector3) -&gt; float</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
722 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
723 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
724
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
725 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
726 <dt class="title" id="pygame.math.Vector3.distance_squared_to">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
727 <tt class="descname">distance_squared_to</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.distance_squared_to" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
728 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
729 <div class="line"><span class="summaryline">calculates the squared euclidic distance to a given vector.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
730 <div class="line"><span class="signature">distance_squared_to(Vector3) -&gt; float</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
731 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
732 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
733
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
734 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
735 <dt class="title" id="pygame.math.Vector3.lerp">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
736 <tt class="descname">lerp</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.lerp" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
737 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
738 <div class="line"><span class="summaryline">returns a linear interpolation to the given vector.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
739 <div class="line"><span class="signature">lerp(Vector3, float) -&gt; Vector3</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
740 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
741 <p>Returns a Vector which is a linear interpolation between self and the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
742 given Vector. The second parameter determines how far between self an
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
743 other the result is going to be. It must be a value between 0 and 1 where
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
744 0 means self an 1 means other will be returned.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
745 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
746
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
747 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
748 <dt class="title" id="pygame.math.Vector3.slerp">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
749 <tt class="descname">slerp</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.slerp" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
750 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
751 <div class="line"><span class="summaryline">returns a spherical interpolation to the given vector.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
752 <div class="line"><span class="signature">slerp(Vector3, float) -&gt; Vector3</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
753 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
754 <p>Calculates the spherical interpolation from self to the given Vector. The
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
755 second argument - often called t - must be in the range [-1, 1]. It
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
756 parametrizes where - in between the two vectors - the result should be.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
757 If a negative value is given the interpolation will not take the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
758 complement of the shortest path.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
759 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
760
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
761 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
762 <dt class="title" id="pygame.math.Vector3.elementwise">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
763 <tt class="descname">elementwise</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.elementwise" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
764 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
765 <div class="line"><span class="summaryline">The next operation will be performed elementwize.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
766 <div class="line"><span class="signature">elementwise() -&gt; VectorElementwizeProxy</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
767 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
768 <p>Applies the following operation to each element of the vector.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
769 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
770
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
771 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
772 <dt class="title" id="pygame.math.Vector3.rotate">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
773 <tt class="descname">rotate</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.rotate" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
774 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
775 <div class="line"><span class="summaryline">rotates a vector by a given angle in degrees.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
776 <div class="line"><span class="signature">rotate(Vector3, float) -&gt; Vector3</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
777 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
778 <p>Returns a vector which has the same length as self but is rotated
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
779 counterclockwise by the given angle in degrees around the given axis.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
780 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
781
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
782 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
783 <dt class="title" id="pygame.math.Vector3.rotate_ip">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
784 <tt class="descname">rotate_ip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.rotate_ip" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
785 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
786 <div class="line"><span class="summaryline">rotates the vector by a given angle in degrees in place.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
787 <div class="line"><span class="signature">rotate_ip(Vector3, float) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
788 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
789 <p>Rotates the vector counterclockwise around the given axis by the given
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
790 angle in degrees. The length of the vector is not changed.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
791 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
792
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
793 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
794 <dt class="title" id="pygame.math.Vector3.rotate_x">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
795 <tt class="descname">rotate_x</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.rotate_x" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
796 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
797 <div class="line"><span class="summaryline">rotates a vector around the x-axis by the angle in degrees.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
798 <div class="line"><span class="signature">rotate_x(float) -&gt; Vector3</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
799 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
800 <p>Returns a vector which has the same length as self but is rotated
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
801 counterclockwise around the x-axis by the given angle in degrees.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
802 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
803
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
804 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
805 <dt class="title" id="pygame.math.Vector3.rotate_x_ip">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
806 <tt class="descname">rotate_x_ip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.rotate_x_ip" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
807 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
808 <div class="line"><span class="summaryline">rotates the vector around the x-axis by the angle in degrees in place.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
809 <div class="line"><span class="signature">rotate_x_ip(float) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
810 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
811 <p>Rotates the vector counterclockwise around the x-axis by the given angle
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
812 in degrees. The length of the vector is not changed.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
813 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
814
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
815 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
816 <dt class="title" id="pygame.math.Vector3.rotate_y">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
817 <tt class="descname">rotate_y</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.rotate_y" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
818 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
819 <div class="line"><span class="summaryline">rotates a vector around the y-axis by the angle in degrees.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
820 <div class="line"><span class="signature">rotate_y(float) -&gt; Vector3</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
821 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
822 <p>Returns a vector which has the same length as self but is rotated
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
823 counterclockwise around the y-axis by the given angle in degrees.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
824 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
825
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
826 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
827 <dt class="title" id="pygame.math.Vector3.rotate_y_ip">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
828 <tt class="descname">rotate_y_ip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.rotate_y_ip" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
829 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
830 <div class="line"><span class="summaryline">rotates the vector around the y-axis by the angle in degrees in place.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
831 <div class="line"><span class="signature">rotate_y_ip(float) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
832 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
833 <p>Rotates the vector counterclockwise around the y-axis by the given angle
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
834 in degrees. The length of the vector is not changed.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
835 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
836
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
837 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
838 <dt class="title" id="pygame.math.Vector3.rotate_z">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
839 <tt class="descname">rotate_z</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.rotate_z" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
840 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
841 <div class="line"><span class="summaryline">rotates a vector around the z-axis by the angle in degrees.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
842 <div class="line"><span class="signature">rotate_z(float) -&gt; Vector3</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
843 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
844 <p>Returns a vector which has the same length as self but is rotated
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
845 counterclockwise around the z-axis by the given angle in degrees.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
846 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
847
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
848 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
849 <dt class="title" id="pygame.math.Vector3.rotate_z_ip">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
850 <tt class="descname">rotate_z_ip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.rotate_z_ip" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
851 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
852 <div class="line"><span class="summaryline">rotates the vector around the z-axis by the angle in degrees in place.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
853 <div class="line"><span class="signature">rotate_z_ip(float) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
854 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
855 <p>Rotates the vector counterclockwise around the z-axis by the given angle
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
856 in degrees. The length of the vector is not changed.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
857 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
858
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
859 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
860 <dt class="title" id="pygame.math.Vector3.angle_to">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
861 <tt class="descname">angle_to</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.angle_to" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
862 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
863 <div class="line"><span class="summaryline">calculates the angle to a given vector in degrees.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
864 <div class="line"><span class="signature">angle_to(Vector3) -&gt; float</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
865 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
866 <p>Returns the angle between self and the given vector.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
867 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
868
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
869 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
870 <dt class="title" id="pygame.math.Vector3.as_spherical">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
871 <tt class="descname">as_spherical</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.as_spherical" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
872 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
873 <div class="line"><span class="summaryline">returns a tuple with radial distance, inclination and azimuthal angle.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
874 <div class="line"><span class="signature">as_spherical() -&gt; (r, theta, phi)</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
875 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
876 <p>Returns a tuple (r, theta, phi) where r is the radial distance, theta is
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
877 the inclination angle and phi is the azimuthal angle.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
878 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
879
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
880 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
881 <dt class="title" id="pygame.math.Vector3.from_spherical">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
882 <tt class="descname">from_spherical</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.math.Vector3.from_spherical" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
883 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
884 <div class="line"><span class="summaryline">Sets x, y and z from a spherical coordinates 3-tuple.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
885 <div class="line"><span class="signature">from_spherical((r, theta, phi)) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
886 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
887 <p>Sets x, y and z from a tuple (r, theta, phi) where r is the radial
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
888 distance, theta is the inclination angle and phi is the azimuthal angle.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
889 </dd></dl>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
890
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
891 </dd></dl>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
892
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
893 </dd></dl>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
894
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
895 </div>
2004
8c57b44e60a8 some more Py3k fixes. compiles but test don't pass yet.
lorenz
parents: 1996
diff changeset
896
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
897 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
898 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
899 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
900 <div class="clearer"></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
901 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
902 <div class="related">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
903 <h3>Navigation</h3>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
904 <ul>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
905 <li class="right" style="margin-right: 10px">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
906 <a href="../genindex.html" title="General Index"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
907 accesskey="I">index</a></li>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
908 <li class="right" >
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
909 <a href="midi.html" title="pygame.midi"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
910 accesskey="N">next</a> |</li>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
911 <li class="right" >
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
912 <a href="mask.html" title="pygame.mask"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
913 accesskey="P">previous</a> |</li>
2239
ca88e9308d44 regenerated html docs. Should all have doc comments from the website now.
Rene Dudfield <renesd@gmail.com>
parents: 2225
diff changeset
914 <li><a href="../index.html">Pygame v1.9.2 documentation</a> &raquo;</li>
ca88e9308d44 regenerated html docs. Should all have doc comments from the website now.
Rene Dudfield <renesd@gmail.com>
parents: 2225
diff changeset
915 <script type="text/javascript" src="jquery.plugin.docscomments.js"></script>
ca88e9308d44 regenerated html docs. Should all have doc comments from the website now.
Rene Dudfield <renesd@gmail.com>
parents: 2225
diff changeset
916
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
917 </ul>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
918 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
919 <div class="footer">
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
920 &copy; Copyright 2011, Pygame Developers.
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
921 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
922 </body>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
923 </html>