eymiha_math3 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/gem_package.rb +1 -2
- data/lib/eymiha_math3.rb +1 -0
- metadata +56 -186
- data/html/classes/Eymiha/Envelope3.html +0 -333
- data/html/classes/Eymiha/Envelope3.src/M000044.html +0 -22
- data/html/classes/Eymiha/Envelope3.src/M000045.html +0 -19
- data/html/classes/Eymiha/Envelope3.src/M000046.html +0 -36
- data/html/classes/Eymiha/Envelope3.src/M000047.html +0 -19
- data/html/classes/Eymiha/Envelope3.src/M000048.html +0 -19
- data/html/classes/Eymiha/Envelope3.src/M000049.html +0 -26
- data/html/classes/Eymiha/Point3.html +0 -962
- data/html/classes/Eymiha/Point3.src/M000064.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000065.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000066.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000067.html +0 -25
- data/html/classes/Eymiha/Point3.src/M000068.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000069.html +0 -20
- data/html/classes/Eymiha/Point3.src/M000071.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000072.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000073.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000074.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000075.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000076.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000077.html +0 -19
- data/html/classes/Eymiha/Point3.src/M000078.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000079.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000080.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000081.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000082.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000083.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000085.html +0 -24
- data/html/classes/Eymiha/Point3.src/M000086.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000088.html +0 -24
- data/html/classes/Eymiha/Point3.src/M000089.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000091.html +0 -24
- data/html/classes/Eymiha/Point3.src/M000092.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000093.html +0 -24
- data/html/classes/Eymiha/Point3.src/M000094.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000095.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000096.html +0 -18
- data/html/classes/Eymiha/Point3.src/M000097.html +0 -30
- data/html/classes/Eymiha/Point3.src/M000098.html +0 -19
- data/html/classes/Eymiha/Point3c.html +0 -493
- data/html/classes/Eymiha/Point3c.src/M000050.html +0 -18
- data/html/classes/Eymiha/Point3c.src/M000051.html +0 -18
- data/html/classes/Eymiha/Point3c.src/M000052.html +0 -18
- data/html/classes/Eymiha/Point3c.src/M000053.html +0 -25
- data/html/classes/Eymiha/Point3c.src/M000054.html +0 -19
- data/html/classes/Eymiha/Point3c.src/M000055.html +0 -22
- data/html/classes/Eymiha/Point3c.src/M000057.html +0 -18
- data/html/classes/Eymiha/Point3c.src/M000058.html +0 -18
- data/html/classes/Eymiha/Point3c.src/M000059.html +0 -18
- data/html/classes/Eymiha/Point3c.src/M000060.html +0 -18
- data/html/classes/Eymiha/Point3c.src/M000061.html +0 -18
- data/html/classes/Eymiha/Point3c.src/M000062.html +0 -18
- data/html/classes/Eymiha/Point3c.src/M000063.html +0 -19
- data/html/classes/Eymiha/Point3s.html +0 -512
- data/html/classes/Eymiha/Point3s.src/M000099.html +0 -18
- data/html/classes/Eymiha/Point3s.src/M000100.html +0 -18
- data/html/classes/Eymiha/Point3s.src/M000101.html +0 -18
- data/html/classes/Eymiha/Point3s.src/M000102.html +0 -18
- data/html/classes/Eymiha/Point3s.src/M000103.html +0 -26
- data/html/classes/Eymiha/Point3s.src/M000104.html +0 -19
- data/html/classes/Eymiha/Point3s.src/M000105.html +0 -21
- data/html/classes/Eymiha/Point3s.src/M000107.html +0 -18
- data/html/classes/Eymiha/Point3s.src/M000108.html +0 -18
- data/html/classes/Eymiha/Point3s.src/M000109.html +0 -18
- data/html/classes/Eymiha/Point3s.src/M000110.html +0 -18
- data/html/classes/Eymiha/Point3s.src/M000111.html +0 -18
- data/html/classes/Eymiha/Point3s.src/M000112.html +0 -18
- data/html/classes/Eymiha/Point3s.src/M000113.html +0 -18
- data/html/classes/Eymiha/Quaternion.html +0 -791
- data/html/classes/Eymiha/Quaternion.src/M000016.html +0 -18
- data/html/classes/Eymiha/Quaternion.src/M000017.html +0 -18
- data/html/classes/Eymiha/Quaternion.src/M000018.html +0 -26
- data/html/classes/Eymiha/Quaternion.src/M000019.html +0 -18
- data/html/classes/Eymiha/Quaternion.src/M000020.html +0 -19
- data/html/classes/Eymiha/Quaternion.src/M000022.html +0 -18
- data/html/classes/Eymiha/Quaternion.src/M000023.html +0 -20
- data/html/classes/Eymiha/Quaternion.src/M000024.html +0 -22
- data/html/classes/Eymiha/Quaternion.src/M000025.html +0 -18
- data/html/classes/Eymiha/Quaternion.src/M000027.html +0 -25
- data/html/classes/Eymiha/Quaternion.src/M000028.html +0 -18
- data/html/classes/Eymiha/Quaternion.src/M000030.html +0 -25
- data/html/classes/Eymiha/Quaternion.src/M000031.html +0 -18
- data/html/classes/Eymiha/Quaternion.src/M000033.html +0 -30
- data/html/classes/Eymiha/Quaternion.src/M000034.html +0 -18
- data/html/classes/Eymiha/Quaternion.src/M000035.html +0 -24
- data/html/classes/Eymiha/Quaternion.src/M000036.html +0 -18
- data/html/classes/Eymiha/Quaternion.src/M000037.html +0 -18
- data/html/classes/Eymiha/Quaternion.src/M000038.html +0 -18
- data/html/classes/Eymiha/Quaternion.src/M000039.html +0 -18
- data/html/classes/Eymiha/Quaternion.src/M000040.html +0 -18
- data/html/classes/Eymiha/Quaternion.src/M000041.html +0 -19
- data/html/classes/Eymiha/Quaternion.src/M000042.html +0 -18
- data/html/classes/Eymiha/Quaternion.src/M000043.html +0 -25
- data/html/classes/Eymiha/ThreeDimensions.html +0 -297
- data/html/classes/Eymiha/ThreeDimensions.src/M000006.html +0 -18
- data/html/classes/Eymiha/ThreeDimensions.src/M000007.html +0 -18
- data/html/classes/Eymiha/ThreeDimensions.src/M000008.html +0 -18
- data/html/classes/Eymiha/ThreeDimensions.src/M000009.html +0 -18
- data/html/classes/Eymiha/ThreeDimensions.src/M000010.html +0 -18
- data/html/classes/Eymiha/ThreeDimensions.src/M000011.html +0 -18
- data/html/classes/Eymiha/ThreeDimensions.src/M000012.html +0 -18
- data/html/classes/Eymiha/ThreeDimensions.src/M000013.html +0 -18
- data/html/classes/Eymiha/ThreeDimensions.src/M000014.html +0 -18
- data/html/classes/Eymiha/ThreeDimensions.src/M000015.html +0 -18
- data/html/classes/Eymiha.html +0 -143
- data/html/classes/Numeric.html +0 -167
- data/html/classes/Numeric.src/M000001.html +0 -18
- data/html/classes/Numeric.src/M000002.html +0 -18
- data/html/classes/Object.html +0 -187
- data/html/classes/Object.src/M000003.html +0 -18
- data/html/classes/Object.src/M000004.html +0 -18
- data/html/classes/Object.src/M000005.html +0 -18
- data/html/created.rid +0 -1
- data/html/files/lib/eymiha/math3/envelope3_rb.html +0 -109
- data/html/files/lib/eymiha/math3/math3_rb.html +0 -109
- data/html/files/lib/eymiha/math3/point3_rb.html +0 -108
- data/html/files/lib/eymiha/math3/point3c_rb.html +0 -108
- data/html/files/lib/eymiha/math3/point3s_rb.html +0 -108
- data/html/files/lib/eymiha/math3/quaternion_rb.html +0 -108
- data/html/files/lib/eymiha/math3_rb.html +0 -113
- data/html/fr_class_index.html +0 -35
- data/html/fr_file_index.html +0 -33
- data/html/fr_method_index.html +0 -139
- data/html/index.html +0 -24
- data/html/rdoc-style.css +0 -208
- data/lib/#envelope3.rb# +0 -96
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>new (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 30</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">axis</span>=<span class="ruby-identifier">origin</span>,<span class="ruby-identifier">real</span>=<span class="ruby-value">0</span>)
|
15
|
-
<span class="ruby-identifier">set</span> <span class="ruby-identifier">axis</span>, <span class="ruby-identifier">real</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>to_s (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 35</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
15
|
-
<span class="ruby-node">"Quaternion: axis: x #{axis.x} y #{axis.y} z #{axis.z} real #{real}"</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>set (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 44</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set</span>(<span class="ruby-identifier">axis</span>=<span class="ruby-identifier">origin</span>,<span class="ruby-identifier">real</span>=<span class="ruby-value">0</span>)
|
15
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">axis</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Quaternion</span>
|
16
|
-
<span class="ruby-identifier">set</span> <span class="ruby-identifier">axis</span>.<span class="ruby-identifier">axis</span>, <span class="ruby-identifier">axis</span>.<span class="ruby-identifier">real</span>
|
17
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">axis</span>.<span class="ruby-identifier">point3_like?</span>
|
18
|
-
(<span class="ruby-ivar">@axis</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">point3</span>).<span class="ruby-identifier">set</span>(<span class="ruby-identifier">axis</span>)
|
19
|
-
<span class="ruby-ivar">@real</span> = <span class="ruby-identifier">real</span>
|
20
|
-
<span class="ruby-keyword kw">else</span>
|
21
|
-
<span class="ruby-identifier">raise_no_conversion</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>,<span class="ruby-identifier">axis</span>)
|
22
|
-
<span class="ruby-keyword kw">end</span>
|
23
|
-
<span class="ruby-keyword kw">self</span>
|
24
|
-
<span class="ruby-keyword kw">end</span></pre>
|
25
|
-
</body>
|
26
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>== (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 58</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">quaternion</span>)
|
15
|
-
(<span class="ruby-ivar">@axis</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">quaternion</span>.<span class="ruby-identifier">axis</span>)<span class="ruby-operator">&&</span>(<span class="ruby-ivar">@real</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">quaternion</span>.<span class="ruby-identifier">real</span>)
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>approximately_equals? (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 65</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">approximately_equals?</span>(<span class="ruby-identifier">quaternion</span>,<span class="ruby-identifier">epsilon</span>=<span class="ruby-constant">Numeric</span>.<span class="ruby-identifier">epsilon</span>)
|
15
|
-
(<span class="ruby-ivar">@axis</span>.<span class="ruby-identifier">approximately_equals?</span>(<span class="ruby-identifier">quaternion</span>.<span class="ruby-identifier">axis</span>,<span class="ruby-identifier">epsilon</span>)<span class="ruby-operator">&&</span>
|
16
|
-
<span class="ruby-ivar">@real</span>.<span class="ruby-identifier">approximately_equals?</span>(<span class="ruby-identifier">quaternion</span>.<span class="ruby-identifier">real</span>,<span class="ruby-identifier">epsilon</span>))
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>quaternion (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 76</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">quaternion</span>(<span class="ruby-identifier">axis</span>=<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">axis</span>,<span class="ruby-identifier">real</span>=<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">real</span>)
|
15
|
-
<span class="ruby-constant">Quaternion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">axis</span>,<span class="ruby-identifier">real</span>)
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>from_axis_angle (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 81</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Quaternion</span>.<span class="ruby-identifier">from_axis_angle</span>(<span class="ruby-identifier">axis</span>,<span class="ruby-identifier">angle</span>)
|
15
|
-
<span class="ruby-identifier">half_angle</span> = <span class="ruby-identifier">angle</span><span class="ruby-operator">/</span><span class="ruby-value">2.0</span>
|
16
|
-
<span class="ruby-constant">Quaternion</span>.<span class="ruby-identifier">new</span> <span class="ruby-constant">Point3</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">axis</span>).<span class="ruby-identifier">scale</span>(<span class="ruby-constant">Math</span>.<span class="ruby-identifier">sin</span>(<span class="ruby-identifier">half_angle</span>)),
|
17
|
-
<span class="ruby-constant">Math</span>.<span class="ruby-identifier">cos</span>(<span class="ruby-identifier">half_angle</span>)
|
18
|
-
<span class="ruby-keyword kw">end</span></pre>
|
19
|
-
</body>
|
20
|
-
</html>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>to_axis_angle (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 88</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_axis_angle</span>
|
15
|
-
<span class="ruby-identifier">half_angle</span> = <span class="ruby-constant">Math</span>.<span class="ruby-identifier">acos</span>(<span class="ruby-ivar">@real</span>)
|
16
|
-
<span class="ruby-identifier">sin_half_angle</span> = <span class="ruby-constant">Math</span>.<span class="ruby-identifier">sin</span>(<span class="ruby-identifier">half_angle</span>)
|
17
|
-
<span class="ruby-identifier">axis</span> = (<span class="ruby-identifier">sin_half_angle</span>.<span class="ruby-identifier">abs</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span><span class="ruby-value">.00000001</span>)<span class="ruby-operator">?</span>
|
18
|
-
<span class="ruby-constant">Point3</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">1</span>,<span class="ruby-value">0</span>,<span class="ruby-value">0</span>) <span class="ruby-operator">:</span> <span class="ruby-constant">Point3</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@axis</span>).<span class="ruby-identifier">scale!</span>(<span class="ruby-value">1.0</span><span class="ruby-operator">/</span><span class="ruby-identifier">sin_half_angle</span>)
|
19
|
-
<span class="ruby-constant">Quaternion</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">axis</span>,<span class="ruby-value">2.0</span><span class="ruby-operator">*</span><span class="ruby-identifier">half_angle</span>)
|
20
|
-
<span class="ruby-keyword kw">end</span></pre>
|
21
|
-
</body>
|
22
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>add (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 101</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">axis</span>=<span class="ruby-identifier">origin</span>,<span class="ruby-identifier">real</span>=<span class="ruby-value">0</span>)
|
15
|
-
<span class="ruby-identifier">quaternion</span>.<span class="ruby-identifier">add!</span>(<span class="ruby-identifier">axis</span>,<span class="ruby-identifier">real</span>)
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>add! (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 108</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add!</span>(<span class="ruby-identifier">axis</span>=<span class="ruby-identifier">origin</span>,<span class="ruby-identifier">real</span>=<span class="ruby-value">0</span>)
|
15
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">axis</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Quaternion</span>
|
16
|
-
<span class="ruby-identifier">add!</span>(<span class="ruby-identifier">axis</span>.<span class="ruby-identifier">axis</span>,<span class="ruby-identifier">axis</span>.<span class="ruby-identifier">real</span>)
|
17
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">axis</span>.<span class="ruby-identifier">point3_like?</span>
|
18
|
-
<span class="ruby-identifier">set</span>(<span class="ruby-ivar">@axis</span><span class="ruby-operator">+</span><span class="ruby-identifier">axis</span>,<span class="ruby-ivar">@real</span><span class="ruby-operator">+</span><span class="ruby-identifier">real</span>)
|
19
|
-
<span class="ruby-keyword kw">else</span>
|
20
|
-
<span class="ruby-identifier">raise_no_conversion</span> <span class="ruby-identifier">axis</span>
|
21
|
-
<span class="ruby-keyword kw">end</span>
|
22
|
-
<span class="ruby-keyword kw">self</span>
|
23
|
-
<span class="ruby-keyword kw">end</span></pre>
|
24
|
-
</body>
|
25
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>subtract (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 124</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">subtract</span>(<span class="ruby-identifier">axis</span>=<span class="ruby-identifier">origin</span>,<span class="ruby-identifier">real</span>=<span class="ruby-value">0</span>)
|
15
|
-
<span class="ruby-identifier">quaternion</span>.<span class="ruby-identifier">subtract!</span>(<span class="ruby-identifier">axis</span>,<span class="ruby-identifier">real</span>)
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>subtract! (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 131</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">subtract!</span>(<span class="ruby-identifier">axis</span>=<span class="ruby-identifier">origin</span>,<span class="ruby-identifier">real</span>=<span class="ruby-value">0</span>)
|
15
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">axis</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Quaternion</span>
|
16
|
-
<span class="ruby-identifier">subtract!</span>(<span class="ruby-identifier">axis</span>.<span class="ruby-identifier">axis</span>,<span class="ruby-identifier">axis</span>.<span class="ruby-identifier">real</span>)
|
17
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">axis</span>.<span class="ruby-identifier">point3_like?</span>
|
18
|
-
<span class="ruby-identifier">set</span>(<span class="ruby-ivar">@axis</span><span class="ruby-operator">-</span><span class="ruby-identifier">axis</span>,<span class="ruby-ivar">@real</span><span class="ruby-operator">-</span><span class="ruby-identifier">real</span>)
|
19
|
-
<span class="ruby-keyword kw">else</span>
|
20
|
-
<span class="ruby-identifier">raise_no_conversion</span> <span class="ruby-identifier">axis</span>
|
21
|
-
<span class="ruby-keyword kw">end</span>
|
22
|
-
<span class="ruby-keyword kw">self</span>
|
23
|
-
<span class="ruby-keyword kw">end</span></pre>
|
24
|
-
</body>
|
25
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>multiply (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 147</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">multiply</span>(<span class="ruby-identifier">axis</span>=<span class="ruby-identifier">origin</span>,<span class="ruby-identifier">real</span>=<span class="ruby-value">1</span>)
|
15
|
-
<span class="ruby-identifier">quaternion</span>.<span class="ruby-identifier">multiply!</span>(<span class="ruby-identifier">axis</span>,<span class="ruby-identifier">real</span>)
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,30 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>multiply! (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 154</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">multiply!</span>(<span class="ruby-identifier">axis</span>=<span class="ruby-identifier">origin</span>,<span class="ruby-identifier">real</span>=<span class="ruby-value">1</span>)
|
15
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">axis</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Quaternion</span>
|
16
|
-
<span class="ruby-identifier">multiply!</span>(<span class="ruby-identifier">axis</span>.<span class="ruby-identifier">axis</span>,<span class="ruby-identifier">axis</span>.<span class="ruby-identifier">real</span>)
|
17
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">axis</span>.<span class="ruby-identifier">point3_like?</span>
|
18
|
-
<span class="ruby-identifier">r</span> = (<span class="ruby-ivar">@real</span><span class="ruby-operator">*</span><span class="ruby-identifier">real</span>)<span class="ruby-operator">-</span><span class="ruby-ivar">@axis</span>.<span class="ruby-identifier">dot</span>(<span class="ruby-identifier">axis</span>)
|
19
|
-
<span class="ruby-identifier">p3</span> = <span class="ruby-identifier">axis</span>.<span class="ruby-identifier">scale</span> <span class="ruby-identifier">r</span>
|
20
|
-
<span class="ruby-identifier">qp3</span> = <span class="ruby-ivar">@axis</span>.<span class="ruby-identifier">scale</span> <span class="ruby-identifier">real</span>
|
21
|
-
<span class="ruby-identifier">cross</span> = <span class="ruby-ivar">@axis</span>.<span class="ruby-identifier">cross</span> <span class="ruby-identifier">axis</span>
|
22
|
-
<span class="ruby-identifier">a</span> = <span class="ruby-identifier">p3</span>.<span class="ruby-identifier">add!</span>(<span class="ruby-identifier">qp3</span>).<span class="ruby-identifier">add!</span>(<span class="ruby-identifier">cross</span>)
|
23
|
-
<span class="ruby-identifier">set</span>(<span class="ruby-identifier">a</span>,<span class="ruby-identifier">r</span>)
|
24
|
-
<span class="ruby-keyword kw">else</span>
|
25
|
-
<span class="ruby-identifier">raise_no_conversion</span> <span class="ruby-identifier">axis</span>
|
26
|
-
<span class="ruby-keyword kw">end</span>
|
27
|
-
<span class="ruby-keyword kw">self</span>
|
28
|
-
<span class="ruby-keyword kw">end</span></pre>
|
29
|
-
</body>
|
30
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>scale (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 175</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scale</span>(<span class="ruby-identifier">scalar</span>=<span class="ruby-value">1</span>)
|
15
|
-
<span class="ruby-identifier">quaternion</span>.<span class="ruby-identifier">scale!</span>(<span class="ruby-identifier">scalar</span>)
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,24 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>scale! (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 180</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scale!</span>(<span class="ruby-identifier">scalar</span>=<span class="ruby-value">1</span>)
|
15
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">scalar</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Quaternion</span>)
|
16
|
-
<span class="ruby-identifier">multiply!</span>(<span class="ruby-identifier">scalar</span>)
|
17
|
-
<span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">scalar</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Numeric</span>)
|
18
|
-
<span class="ruby-identifier">set</span>(<span class="ruby-ivar">@axis</span>.<span class="ruby-identifier">scale</span>(<span class="ruby-identifier">scalar</span>),<span class="ruby-ivar">@real</span><span class="ruby-operator">*</span><span class="ruby-identifier">scalar</span>)
|
19
|
-
<span class="ruby-keyword kw">else</span>
|
20
|
-
<span class="ruby-identifier">raise_no_conversion</span> <span class="ruby-identifier">scalar</span>, <span class="ruby-value str">"Numeric"</span>
|
21
|
-
<span class="ruby-keyword kw">end</span>
|
22
|
-
<span class="ruby-keyword kw">end</span></pre>
|
23
|
-
</body>
|
24
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>conjugate (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 192</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">conjugate</span>
|
15
|
-
<span class="ruby-identifier">quaternion</span>.<span class="ruby-identifier">conjugate!</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>conjugate! (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 197</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">conjugate!</span>
|
15
|
-
<span class="ruby-identifier">set</span>(<span class="ruby-ivar">@axis</span>.<span class="ruby-identifier">mirror</span>,<span class="ruby-ivar">@real</span>)
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>norm (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 202</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">norm</span>
|
15
|
-
(<span class="ruby-ivar">@real</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@real</span>) <span class="ruby-operator">+</span> <span class="ruby-ivar">@axis</span>.<span class="ruby-identifier">modulus</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>abs (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 207</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">abs</span>
|
15
|
-
<span class="ruby-constant">Math</span>.<span class="ruby-identifier">sqrt</span>(<span class="ruby-identifier">norm</span>)
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>inverse (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 213</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inverse</span>
|
15
|
-
<span class="ruby-identifier">quaternion</span>.<span class="ruby-identifier">inverse!</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>inverse! (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 218</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inverse!</span>
|
15
|
-
<span class="ruby-identifier">conjugate!</span>
|
16
|
-
<span class="ruby-identifier">scale!</span>(<span class="ruby-value">1.0</span><span class="ruby-operator">/</span><span class="ruby-identifier">norm</span>)
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>divide (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 228</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">divide</span>(<span class="ruby-identifier">axis</span>=<span class="ruby-identifier">origin</span>,<span class="ruby-identifier">real</span>=<span class="ruby-value">1</span>)
|
15
|
-
<span class="ruby-identifier">quaternion</span>.<span class="ruby-identifier">divide!</span>(<span class="ruby-identifier">axis</span>,<span class="ruby-identifier">origin</span>)
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>divide! (Eymiha::Quaternion)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/eymiha/math3/quaternion.rb, line 233</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">divide!</span>(<span class="ruby-identifier">axis</span>=<span class="ruby-identifier">origin</span>,<span class="ruby-identifier">real</span>=<span class="ruby-value">1</span>)
|
15
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">axis</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Quaternion</span>
|
16
|
-
<span class="ruby-identifier">divide!</span>(<span class="ruby-identifier">axis</span>.<span class="ruby-identifier">axis</span>,<span class="ruby-identifier">axis</span>.<span class="ruby-identifier">real</span>)
|
17
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">axis</span>.<span class="ruby-identifier">point3_like?</span>
|
18
|
-
<span class="ruby-identifier">multiply!</span>(<span class="ruby-identifier">quaternion</span>(<span class="ruby-identifier">axis</span>,<span class="ruby-identifier">real</span>).<span class="ruby-identifier">inverse!</span>)
|
19
|
-
<span class="ruby-keyword kw">else</span>
|
20
|
-
<span class="ruby-identifier">raise_no_conversion</span> <span class="ruby-identifier">axis</span>
|
21
|
-
<span class="ruby-keyword kw">end</span>
|
22
|
-
<span class="ruby-keyword kw">self</span>
|
23
|
-
<span class="ruby-keyword kw">end</span></pre>
|
24
|
-
</body>
|
25
|
-
</html>
|