zyps 0.6.1 → 0.6.2
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/README.txt +2 -2
- data/bin/zyps_demo +2 -8
- data/bin/zyps_server +14 -41
- data/lib/zyps/environmental_factors.rb +33 -5
- data/lib/zyps/remote.rb +103 -0
- data/test/zyps/test_actions.rb +2 -1
- data/test/zyps/test_conditions.rb +0 -6
- data/test/zyps/test_environmental_factors.rb +1 -2
- data/test/zyps/test_remote.rb +113 -0
- metadata +11 -183
- data/doc/classes/Zyps/AccelerateAction.html +0 -200
- data/doc/classes/Zyps/AccelerateAction.src/M000020.html +0 -19
- data/doc/classes/Zyps/AccelerateAction.src/M000021.html +0 -19
- data/doc/classes/Zyps/AccelerateAction.src/M000022.html +0 -18
- data/doc/classes/Zyps/Accelerator.html +0 -181
- data/doc/classes/Zyps/Accelerator.src/M000044.html +0 -19
- data/doc/classes/Zyps/Accelerator.src/M000045.html +0 -18
- data/doc/classes/Zyps/Action.html +0 -217
- data/doc/classes/Zyps/Action.src/M000014.html +0 -18
- data/doc/classes/Zyps/Action.src/M000015.html +0 -18
- data/doc/classes/Zyps/Action.src/M000016.html +0 -17
- data/doc/classes/Zyps/Action.src/M000017.html +0 -18
- data/doc/classes/Zyps/AgeCondition.html +0 -181
- data/doc/classes/Zyps/AgeCondition.src/M000058.html +0 -18
- data/doc/classes/Zyps/AgeCondition.src/M000059.html +0 -18
- data/doc/classes/Zyps/ApproachAction.html +0 -207
- data/doc/classes/Zyps/ApproachAction.src/M000074.html +0 -19
- data/doc/classes/Zyps/ApproachAction.src/M000075.html +0 -19
- data/doc/classes/Zyps/ApproachAction.src/M000076.html +0 -38
- data/doc/classes/Zyps/Behavior.html +0 -206
- data/doc/classes/Zyps/Behavior.src/M000012.html +0 -20
- data/doc/classes/Zyps/Behavior.src/M000013.html +0 -31
- data/doc/classes/Zyps/BlendAction.html +0 -181
- data/doc/classes/Zyps/BlendAction.src/M000066.html +0 -18
- data/doc/classes/Zyps/BlendAction.src/M000067.html +0 -18
- data/doc/classes/Zyps/Clock.html +0 -180
- data/doc/classes/Zyps/Clock.src/M000069.html +0 -18
- data/doc/classes/Zyps/Clock.src/M000070.html +0 -21
- data/doc/classes/Zyps/Clock.src/M000071.html +0 -18
- data/doc/classes/Zyps/CollisionCondition.html +0 -148
- data/doc/classes/Zyps/CollisionCondition.src/M000083.html +0 -18
- data/doc/classes/Zyps/Color.html +0 -299
- data/doc/classes/Zyps/Color.src/M000038.html +0 -18
- data/doc/classes/Zyps/Color.src/M000039.html +0 -16
- data/doc/classes/Zyps/Color.src/M000040.html +0 -16
- data/doc/classes/Zyps/Color.src/M000041.html +0 -16
- data/doc/classes/Zyps/Color.src/M000042.html +0 -18
- data/doc/classes/Zyps/Color.src/M000043.html +0 -22
- data/doc/classes/Zyps/Condition.html +0 -118
- data/doc/classes/Zyps/Creature.html +0 -190
- data/doc/classes/Zyps/Creature.src/M000025.html +0 -19
- data/doc/classes/Zyps/Creature.src/M000026.html +0 -18
- data/doc/classes/Zyps/DestroyAction.html +0 -181
- data/doc/classes/Zyps/DestroyAction.src/M000054.html +0 -18
- data/doc/classes/Zyps/DestroyAction.src/M000055.html +0 -20
- data/doc/classes/Zyps/EatAction.html +0 -149
- data/doc/classes/Zyps/EatAction.src/M000068.html +0 -21
- data/doc/classes/Zyps/Enclosure.html +0 -206
- data/doc/classes/Zyps/Enclosure.src/M000010.html +0 -18
- data/doc/classes/Zyps/Enclosure.src/M000011.html +0 -31
- data/doc/classes/Zyps/Environment.html +0 -203
- data/doc/classes/Zyps/Environment.src/M000081.html +0 -19
- data/doc/classes/Zyps/Environment.src/M000082.html +0 -67
- data/doc/classes/Zyps/EnvironmentalFactor.html +0 -118
- data/doc/classes/Zyps/FaceAction.html +0 -148
- data/doc/classes/Zyps/FaceAction.src/M000080.html +0 -18
- data/doc/classes/Zyps/FleeAction.html +0 -207
- data/doc/classes/Zyps/FleeAction.src/M000084.html +0 -19
- data/doc/classes/Zyps/FleeAction.src/M000085.html +0 -19
- data/doc/classes/Zyps/FleeAction.src/M000086.html +0 -38
- data/doc/classes/Zyps/Friction.html +0 -181
- data/doc/classes/Zyps/Friction.src/M000072.html +0 -19
- data/doc/classes/Zyps/Friction.src/M000073.html +0 -18
- data/doc/classes/Zyps/GameObject.html +0 -282
- data/doc/classes/Zyps/GameObject.src/M000060.html +0 -19
- data/doc/classes/Zyps/GameObject.src/M000061.html +0 -16
- data/doc/classes/Zyps/GameObject.src/M000062.html +0 -19
- data/doc/classes/Zyps/GameObject.src/M000063.html +0 -16
- data/doc/classes/Zyps/GameObject.src/M000064.html +0 -16
- data/doc/classes/Zyps/Gravity.html +0 -145
- data/doc/classes/Zyps/Gravity.src/M000065.html +0 -16
- data/doc/classes/Zyps/Location.html +0 -167
- data/doc/classes/Zyps/Location.src/M000037.html +0 -18
- data/doc/classes/Zyps/NoMatchException.html +0 -111
- data/doc/classes/Zyps/PopulationLimit.html +0 -183
- data/doc/classes/Zyps/PopulationLimit.src/M000027.html +0 -19
- data/doc/classes/Zyps/PopulationLimit.src/M000028.html +0 -20
- data/doc/classes/Zyps/ProximityCondition.html +0 -182
- data/doc/classes/Zyps/ProximityCondition.src/M000056.html +0 -18
- data/doc/classes/Zyps/ProximityCondition.src/M000057.html +0 -18
- data/doc/classes/Zyps/PullAction.html +0 -199
- data/doc/classes/Zyps/PullAction.src/M000046.html +0 -19
- data/doc/classes/Zyps/PullAction.src/M000047.html +0 -19
- data/doc/classes/Zyps/PullAction.src/M000048.html +0 -23
- data/doc/classes/Zyps/PushAction.html +0 -199
- data/doc/classes/Zyps/PushAction.src/M000049.html +0 -19
- data/doc/classes/Zyps/PushAction.src/M000050.html +0 -19
- data/doc/classes/Zyps/PushAction.src/M000051.html +0 -23
- data/doc/classes/Zyps/SpeedLimit.html +0 -181
- data/doc/classes/Zyps/SpeedLimit.src/M000023.html +0 -18
- data/doc/classes/Zyps/SpeedLimit.src/M000024.html +0 -18
- data/doc/classes/Zyps/TagAction.html +0 -181
- data/doc/classes/Zyps/TagAction.src/M000052.html +0 -18
- data/doc/classes/Zyps/TagAction.src/M000053.html +0 -18
- data/doc/classes/Zyps/TagCondition.html +0 -181
- data/doc/classes/Zyps/TagCondition.src/M000018.html +0 -18
- data/doc/classes/Zyps/TagCondition.src/M000019.html +0 -18
- data/doc/classes/Zyps/TrailsView.html +0 -209
- data/doc/classes/Zyps/TrailsView.src/M000008.html +0 -40
- data/doc/classes/Zyps/TrailsView.src/M000009.html +0 -78
- data/doc/classes/Zyps/TurnAction.html +0 -200
- data/doc/classes/Zyps/TurnAction.src/M000077.html +0 -19
- data/doc/classes/Zyps/TurnAction.src/M000078.html +0 -19
- data/doc/classes/Zyps/TurnAction.src/M000079.html +0 -18
- data/doc/classes/Zyps/Utility.html +0 -251
- data/doc/classes/Zyps/Utility.src/M000001.html +0 -26
- data/doc/classes/Zyps/Utility.src/M000002.html +0 -22
- data/doc/classes/Zyps/Utility.src/M000003.html +0 -18
- data/doc/classes/Zyps/Utility.src/M000004.html +0 -21
- data/doc/classes/Zyps/Utility.src/M000005.html +0 -25
- data/doc/classes/Zyps/Utility.src/M000006.html +0 -21
- data/doc/classes/Zyps/Utility.src/M000007.html +0 -21
- data/doc/classes/Zyps/Vector.html +0 -281
- data/doc/classes/Zyps/Vector.src/M000029.html +0 -19
- data/doc/classes/Zyps/Vector.src/M000030.html +0 -16
- data/doc/classes/Zyps/Vector.src/M000031.html +0 -21
- data/doc/classes/Zyps/Vector.src/M000032.html +0 -16
- data/doc/classes/Zyps/Vector.src/M000033.html +0 -18
- data/doc/classes/Zyps/Vector.src/M000034.html +0 -16
- data/doc/classes/Zyps/Vector.src/M000035.html +0 -18
- data/doc/classes/Zyps/Vector.src/M000036.html +0 -25
- data/doc/classes/Zyps.html +0 -161
- data/doc/created.rid +0 -1
- data/doc/files/COPYING_LESSER_txt.html +0 -311
- data/doc/files/COPYING_txt.html +0 -1003
- data/doc/files/README_txt.html +0 -236
- data/doc/files/lib/zyps/actions_rb.html +0 -134
- data/doc/files/lib/zyps/conditions_rb.html +0 -134
- data/doc/files/lib/zyps/environmental_factors_rb.html +0 -134
- data/doc/files/lib/zyps/views/trails_rb.html +0 -134
- data/doc/files/lib/zyps_rb.html +0 -134
- data/doc/fr_class_index.html +0 -62
- data/doc/fr_file_index.html +0 -34
- data/doc/fr_method_index.html +0 -112
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
|
@@ -1,200 +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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
-
<head>
|
|
8
|
-
<title>Class: Zyps::TurnAction</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
-
<script type="text/javascript">
|
|
13
|
-
// <![CDATA[
|
|
14
|
-
|
|
15
|
-
function popupCode( url ) {
|
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function toggleCode( id ) {
|
|
20
|
-
if ( document.getElementById )
|
|
21
|
-
elem = document.getElementById( id );
|
|
22
|
-
else if ( document.all )
|
|
23
|
-
elem = eval( "document.all." + id );
|
|
24
|
-
else
|
|
25
|
-
return false;
|
|
26
|
-
|
|
27
|
-
elemStyle = elem.style;
|
|
28
|
-
|
|
29
|
-
if ( elemStyle.display != "block" ) {
|
|
30
|
-
elemStyle.display = "block"
|
|
31
|
-
} else {
|
|
32
|
-
elemStyle.display = "none"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Make codeblocks hidden by default
|
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
-
|
|
41
|
-
// ]]>
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
</head>
|
|
45
|
-
<body>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<div id="classHeader">
|
|
50
|
-
<table class="header-table">
|
|
51
|
-
<tr class="top-aligned-row">
|
|
52
|
-
<td><strong>Class</strong></td>
|
|
53
|
-
<td class="class-name-in-header">Zyps::TurnAction</td>
|
|
54
|
-
</tr>
|
|
55
|
-
<tr class="top-aligned-row">
|
|
56
|
-
<td><strong>In:</strong></td>
|
|
57
|
-
<td>
|
|
58
|
-
<a href="../../files/lib/zyps/actions_rb.html">
|
|
59
|
-
lib/zyps/actions.rb
|
|
60
|
-
</a>
|
|
61
|
-
<br />
|
|
62
|
-
</td>
|
|
63
|
-
</tr>
|
|
64
|
-
|
|
65
|
-
<tr class="top-aligned-row">
|
|
66
|
-
<td><strong>Parent:</strong></td>
|
|
67
|
-
<td>
|
|
68
|
-
<a href="Action.html">
|
|
69
|
-
Action
|
|
70
|
-
</a>
|
|
71
|
-
</td>
|
|
72
|
-
</tr>
|
|
73
|
-
</table>
|
|
74
|
-
</div>
|
|
75
|
-
<!-- banner header -->
|
|
76
|
-
|
|
77
|
-
<div id="bodyContent">
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<div id="contextContent">
|
|
82
|
-
|
|
83
|
-
<div id="description">
|
|
84
|
-
<p>
|
|
85
|
-
Turn over time.
|
|
86
|
-
</p>
|
|
87
|
-
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
</div>
|
|
92
|
-
|
|
93
|
-
<div id="method-list">
|
|
94
|
-
<h3 class="section-bar">Methods</h3>
|
|
95
|
-
|
|
96
|
-
<div class="name-list">
|
|
97
|
-
<a href="#M000079">do</a>
|
|
98
|
-
<a href="#M000077">new</a>
|
|
99
|
-
<a href="#M000078">start</a>
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
<!-- if includes -->
|
|
107
|
-
|
|
108
|
-
<div id="section">
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
<div id="attribute-list">
|
|
115
|
-
<h3 class="section-bar">Attributes</h3>
|
|
116
|
-
|
|
117
|
-
<div class="name-list">
|
|
118
|
-
<table>
|
|
119
|
-
<tr class="top-aligned-row context-row">
|
|
120
|
-
<td class="context-item-name">rate</td>
|
|
121
|
-
<td class="context-item-value"> [RW] </td>
|
|
122
|
-
<td class="context-item-desc">
|
|
123
|
-
Degrees per second to turn. Positive turns clockwise, negative turns
|
|
124
|
-
counter-clockwise.
|
|
125
|
-
|
|
126
|
-
</td>
|
|
127
|
-
</tr>
|
|
128
|
-
</table>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
<!-- if method_list -->
|
|
135
|
-
<div id="methods">
|
|
136
|
-
<h3 class="section-bar">Public Class methods</h3>
|
|
137
|
-
|
|
138
|
-
<div id="method-M000077" class="method-detail">
|
|
139
|
-
<a name="M000077"></a>
|
|
140
|
-
|
|
141
|
-
<div class="method-heading">
|
|
142
|
-
<a href="TurnAction.src/M000077.html" target="Code" class="method-signature"
|
|
143
|
-
onclick="popupCode('TurnAction.src/M000077.html');return false;">
|
|
144
|
-
<span class="method-name">new</span><span class="method-args">(rate = 0)</span>
|
|
145
|
-
</a>
|
|
146
|
-
</div>
|
|
147
|
-
|
|
148
|
-
<div class="method-description">
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
|
|
152
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
|
153
|
-
|
|
154
|
-
<div id="method-M000079" class="method-detail">
|
|
155
|
-
<a name="M000079"></a>
|
|
156
|
-
|
|
157
|
-
<div class="method-heading">
|
|
158
|
-
<a href="TurnAction.src/M000079.html" target="Code" class="method-signature"
|
|
159
|
-
onclick="popupCode('TurnAction.src/M000079.html');return false;">
|
|
160
|
-
<span class="method-name">do</span><span class="method-args">(actor, target)</span>
|
|
161
|
-
</a>
|
|
162
|
-
</div>
|
|
163
|
-
|
|
164
|
-
<div class="method-description">
|
|
165
|
-
<p>
|
|
166
|
-
Turn according to elapsed time.
|
|
167
|
-
</p>
|
|
168
|
-
</div>
|
|
169
|
-
</div>
|
|
170
|
-
|
|
171
|
-
<div id="method-M000078" class="method-detail">
|
|
172
|
-
<a name="M000078"></a>
|
|
173
|
-
|
|
174
|
-
<div class="method-heading">
|
|
175
|
-
<a href="TurnAction.src/M000078.html" target="Code" class="method-signature"
|
|
176
|
-
onclick="popupCode('TurnAction.src/M000078.html');return false;">
|
|
177
|
-
<span class="method-name">start</span><span class="method-args">(actor, target)</span>
|
|
178
|
-
</a>
|
|
179
|
-
</div>
|
|
180
|
-
|
|
181
|
-
<div class="method-description">
|
|
182
|
-
<p>
|
|
183
|
-
Begin tracking time between actions.
|
|
184
|
-
</p>
|
|
185
|
-
</div>
|
|
186
|
-
</div>
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
</div>
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
</div>
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
<div id="validator-badges">
|
|
196
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
197
|
-
</div>
|
|
198
|
-
|
|
199
|
-
</body>
|
|
200
|
-
</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>new (Zyps::TurnAction)</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/zyps/actions.rb, line 59</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">rate</span> = <span class="ruby-value">0</span>)
|
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rate</span> = <span class="ruby-identifier">rate</span>
|
|
16
|
-
<span class="ruby-ivar">@clock</span> = <span class="ruby-constant">Clock</span>.<span class="ruby-identifier">new</span>
|
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
-
</body>
|
|
19
|
-
</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>start (Zyps::TurnAction)</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/zyps/actions.rb, line 64</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>(<span class="ruby-identifier">actor</span>, <span class="ruby-identifier">target</span>)
|
|
15
|
-
<span class="ruby-keyword kw">super</span>
|
|
16
|
-
<span class="ruby-ivar">@clock</span>.<span class="ruby-identifier">reset_elapsed_time</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>do (Zyps::TurnAction)</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/zyps/actions.rb, line 69</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">do</span>(<span class="ruby-identifier">actor</span>, <span class="ruby-identifier">target</span>)
|
|
15
|
-
<span class="ruby-identifier">actor</span>.<span class="ruby-identifier">vector</span>.<span class="ruby-identifier">pitch</span> <span class="ruby-operator">+=</span> <span class="ruby-ivar">@clock</span>.<span class="ruby-identifier">elapsed_time</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">rate</span>
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1,251 +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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
-
<head>
|
|
8
|
-
<title>Module: Zyps::Utility</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
-
<script type="text/javascript">
|
|
13
|
-
// <![CDATA[
|
|
14
|
-
|
|
15
|
-
function popupCode( url ) {
|
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function toggleCode( id ) {
|
|
20
|
-
if ( document.getElementById )
|
|
21
|
-
elem = document.getElementById( id );
|
|
22
|
-
else if ( document.all )
|
|
23
|
-
elem = eval( "document.all." + id );
|
|
24
|
-
else
|
|
25
|
-
return false;
|
|
26
|
-
|
|
27
|
-
elemStyle = elem.style;
|
|
28
|
-
|
|
29
|
-
if ( elemStyle.display != "block" ) {
|
|
30
|
-
elemStyle.display = "block"
|
|
31
|
-
} else {
|
|
32
|
-
elemStyle.display = "none"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Make codeblocks hidden by default
|
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
-
|
|
41
|
-
// ]]>
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
</head>
|
|
45
|
-
<body>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<div id="classHeader">
|
|
50
|
-
<table class="header-table">
|
|
51
|
-
<tr class="top-aligned-row">
|
|
52
|
-
<td><strong>Module</strong></td>
|
|
53
|
-
<td class="class-name-in-header">Zyps::Utility</td>
|
|
54
|
-
</tr>
|
|
55
|
-
<tr class="top-aligned-row">
|
|
56
|
-
<td><strong>In:</strong></td>
|
|
57
|
-
<td>
|
|
58
|
-
<a href="../../files/lib/zyps_rb.html">
|
|
59
|
-
lib/zyps.rb
|
|
60
|
-
</a>
|
|
61
|
-
<br />
|
|
62
|
-
</td>
|
|
63
|
-
</tr>
|
|
64
|
-
|
|
65
|
-
</table>
|
|
66
|
-
</div>
|
|
67
|
-
<!-- banner header -->
|
|
68
|
-
|
|
69
|
-
<div id="bodyContent">
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<div id="contextContent">
|
|
74
|
-
|
|
75
|
-
<div id="description">
|
|
76
|
-
<p>
|
|
77
|
-
Various methods for working with Vectors, etc.
|
|
78
|
-
</p>
|
|
79
|
-
|
|
80
|
-
</div>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
<div id="method-list">
|
|
86
|
-
<h3 class="section-bar">Methods</h3>
|
|
87
|
-
|
|
88
|
-
<div class="name-list">
|
|
89
|
-
<a href="#M000007">collided?</a>
|
|
90
|
-
<a href="#M000005">constrain_value</a>
|
|
91
|
-
<a href="#M000001">find_angle</a>
|
|
92
|
-
<a href="#M000002">find_distance</a>
|
|
93
|
-
<a href="#M000006">find_reflection_angle</a>
|
|
94
|
-
<a href="#M000003">to_degrees</a>
|
|
95
|
-
<a href="#M000004">to_radians</a>
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
<!-- if includes -->
|
|
103
|
-
|
|
104
|
-
<div id="section">
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<!-- if method_list -->
|
|
114
|
-
<div id="methods">
|
|
115
|
-
<h3 class="section-bar">Public Class methods</h3>
|
|
116
|
-
|
|
117
|
-
<div id="method-M000007" class="method-detail">
|
|
118
|
-
<a name="M000007"></a>
|
|
119
|
-
|
|
120
|
-
<div class="method-heading">
|
|
121
|
-
<a href="Utility.src/M000007.html" target="Code" class="method-signature"
|
|
122
|
-
onclick="popupCode('Utility.src/M000007.html');return false;">
|
|
123
|
-
<span class="method-name">collided?</span><span class="method-args">(object1, object2)</span>
|
|
124
|
-
</a>
|
|
125
|
-
</div>
|
|
126
|
-
|
|
127
|
-
<div class="method-description">
|
|
128
|
-
<p>
|
|
129
|
-
Given two GameObjects, determine if the boundary of one crosses the
|
|
130
|
-
boundary of the other.
|
|
131
|
-
</p>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
<div id="method-M000005" class="method-detail">
|
|
136
|
-
<a name="M000005"></a>
|
|
137
|
-
|
|
138
|
-
<div class="method-heading">
|
|
139
|
-
<a href="Utility.src/M000005.html" target="Code" class="method-signature"
|
|
140
|
-
onclick="popupCode('Utility.src/M000005.html');return false;">
|
|
141
|
-
<span class="method-name">constrain_value</span><span class="method-args">(value, absolute_maximum)</span>
|
|
142
|
-
</a>
|
|
143
|
-
</div>
|
|
144
|
-
|
|
145
|
-
<div class="method-description">
|
|
146
|
-
<p>
|
|
147
|
-
Reduce a number to within an allowed maximum (or minimum, if the number is
|
|
148
|
-
negative).
|
|
149
|
-
</p>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
|
|
153
|
-
<div id="method-M000001" class="method-detail">
|
|
154
|
-
<a name="M000001"></a>
|
|
155
|
-
|
|
156
|
-
<div class="method-heading">
|
|
157
|
-
<a href="Utility.src/M000001.html" target="Code" class="method-signature"
|
|
158
|
-
onclick="popupCode('Utility.src/M000001.html');return false;">
|
|
159
|
-
<span class="method-name">find_angle</span><span class="method-args">(origin, target)</span>
|
|
160
|
-
</a>
|
|
161
|
-
</div>
|
|
162
|
-
|
|
163
|
-
<div class="method-description">
|
|
164
|
-
<p>
|
|
165
|
-
Get the angle (in degrees) from one <a href="Location.html">Location</a> to
|
|
166
|
-
another.
|
|
167
|
-
</p>
|
|
168
|
-
</div>
|
|
169
|
-
</div>
|
|
170
|
-
|
|
171
|
-
<div id="method-M000002" class="method-detail">
|
|
172
|
-
<a name="M000002"></a>
|
|
173
|
-
|
|
174
|
-
<div class="method-heading">
|
|
175
|
-
<a href="Utility.src/M000002.html" target="Code" class="method-signature"
|
|
176
|
-
onclick="popupCode('Utility.src/M000002.html');return false;">
|
|
177
|
-
<span class="method-name">find_distance</span><span class="method-args">(origin, target)</span>
|
|
178
|
-
</a>
|
|
179
|
-
</div>
|
|
180
|
-
|
|
181
|
-
<div class="method-description">
|
|
182
|
-
<p>
|
|
183
|
-
Get the distance from one <a href="Location.html">Location</a> to another.
|
|
184
|
-
</p>
|
|
185
|
-
</div>
|
|
186
|
-
</div>
|
|
187
|
-
|
|
188
|
-
<div id="method-M000006" class="method-detail">
|
|
189
|
-
<a name="M000006"></a>
|
|
190
|
-
|
|
191
|
-
<div class="method-heading">
|
|
192
|
-
<a href="Utility.src/M000006.html" target="Code" class="method-signature"
|
|
193
|
-
onclick="popupCode('Utility.src/M000006.html');return false;">
|
|
194
|
-
<span class="method-name">find_reflection_angle</span><span class="method-args">(normal, angle)</span>
|
|
195
|
-
</a>
|
|
196
|
-
</div>
|
|
197
|
-
|
|
198
|
-
<div class="method-description">
|
|
199
|
-
<p>
|
|
200
|
-
Given a normal and an angle, find the reflection angle.
|
|
201
|
-
</p>
|
|
202
|
-
</div>
|
|
203
|
-
</div>
|
|
204
|
-
|
|
205
|
-
<div id="method-M000003" class="method-detail">
|
|
206
|
-
<a name="M000003"></a>
|
|
207
|
-
|
|
208
|
-
<div class="method-heading">
|
|
209
|
-
<a href="Utility.src/M000003.html" target="Code" class="method-signature"
|
|
210
|
-
onclick="popupCode('Utility.src/M000003.html');return false;">
|
|
211
|
-
<span class="method-name">to_degrees</span><span class="method-args">(radians)</span>
|
|
212
|
-
</a>
|
|
213
|
-
</div>
|
|
214
|
-
|
|
215
|
-
<div class="method-description">
|
|
216
|
-
<p>
|
|
217
|
-
Convert radians to degrees.
|
|
218
|
-
</p>
|
|
219
|
-
</div>
|
|
220
|
-
</div>
|
|
221
|
-
|
|
222
|
-
<div id="method-M000004" class="method-detail">
|
|
223
|
-
<a name="M000004"></a>
|
|
224
|
-
|
|
225
|
-
<div class="method-heading">
|
|
226
|
-
<a href="Utility.src/M000004.html" target="Code" class="method-signature"
|
|
227
|
-
onclick="popupCode('Utility.src/M000004.html');return false;">
|
|
228
|
-
<span class="method-name">to_radians</span><span class="method-args">(degrees)</span>
|
|
229
|
-
</a>
|
|
230
|
-
</div>
|
|
231
|
-
|
|
232
|
-
<div class="method-description">
|
|
233
|
-
<p>
|
|
234
|
-
Convert degrees to radians.
|
|
235
|
-
</p>
|
|
236
|
-
</div>
|
|
237
|
-
</div>
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
</div>
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
</div>
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
<div id="validator-badges">
|
|
247
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
248
|
-
</div>
|
|
249
|
-
|
|
250
|
-
</body>
|
|
251
|
-
</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>find_angle (Zyps::Utility)</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/zyps.rb, line 415</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Utility</span>.<span class="ruby-identifier">find_angle</span>(<span class="ruby-identifier">origin</span>, <span class="ruby-identifier">target</span>)
|
|
15
|
-
<span class="ruby-comment cmt">#Get vector from origin to target.</span>
|
|
16
|
-
<span class="ruby-identifier">x_difference</span> = <span class="ruby-identifier">target</span>.<span class="ruby-identifier">x</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">origin</span>.<span class="ruby-identifier">x</span>
|
|
17
|
-
<span class="ruby-identifier">y_difference</span> = <span class="ruby-identifier">target</span>.<span class="ruby-identifier">y</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">origin</span>.<span class="ruby-identifier">y</span>
|
|
18
|
-
<span class="ruby-comment cmt">#Get vector's angle.</span>
|
|
19
|
-
<span class="ruby-identifier">radians</span> = <span class="ruby-constant">Math</span>.<span class="ruby-identifier">atan2</span>(<span class="ruby-identifier">y_difference</span>, <span class="ruby-identifier">x_difference</span>)
|
|
20
|
-
<span class="ruby-comment cmt">#Result will range from negative Pi to Pi, so correct it.</span>
|
|
21
|
-
<span class="ruby-identifier">radians</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">PI2</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">radians</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span>
|
|
22
|
-
<span class="ruby-comment cmt">#Convert to degrees.</span>
|
|
23
|
-
<span class="ruby-identifier">to_degrees</span>(<span class="ruby-identifier">radians</span>)
|
|
24
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
25
|
-
</body>
|
|
26
|
-
</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>find_distance (Zyps::Utility)</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/zyps.rb, line 428</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Utility</span>.<span class="ruby-identifier">find_distance</span>(<span class="ruby-identifier">origin</span>, <span class="ruby-identifier">target</span>)
|
|
15
|
-
<span class="ruby-comment cmt">#Get vector from origin to target.</span>
|
|
16
|
-
<span class="ruby-identifier">x_difference</span> = <span class="ruby-identifier">origin</span>.<span class="ruby-identifier">x</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">target</span>.<span class="ruby-identifier">x</span>
|
|
17
|
-
<span class="ruby-identifier">y_difference</span> = <span class="ruby-identifier">origin</span>.<span class="ruby-identifier">y</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">target</span>.<span class="ruby-identifier">y</span>
|
|
18
|
-
<span class="ruby-comment cmt">#Get distance.</span>
|
|
19
|
-
<span class="ruby-constant">Math</span>.<span class="ruby-identifier">sqrt</span>(<span class="ruby-identifier">x_difference</span> <span class="ruby-operator">**</span> <span class="ruby-value">2</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">y_difference</span> <span class="ruby-operator">**</span> <span class="ruby-value">2</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>to_degrees (Zyps::Utility)</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/zyps.rb, line 437</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Utility</span>.<span class="ruby-identifier">to_degrees</span>(<span class="ruby-identifier">radians</span>)
|
|
15
|
-
<span class="ruby-identifier">radians</span> <span class="ruby-operator">/</span> <span class="ruby-constant">PI2</span> <span class="ruby-operator">*</span> <span class="ruby-value">360</span>
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1,21 +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_radians (Zyps::Utility)</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/zyps.rb, line 442</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Utility</span>.<span class="ruby-identifier">to_radians</span>(<span class="ruby-identifier">degrees</span>)
|
|
15
|
-
<span class="ruby-identifier">radians</span> = <span class="ruby-identifier">degrees</span> <span class="ruby-operator">/</span> <span class="ruby-value">360.0</span> <span class="ruby-operator">*</span> <span class="ruby-constant">PI2</span>
|
|
16
|
-
<span class="ruby-identifier">radians</span> = <span class="ruby-identifier">radians</span> <span class="ruby-operator">%</span> <span class="ruby-constant">PI2</span>
|
|
17
|
-
<span class="ruby-identifier">radians</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">PI2</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">radians</span> <span class="ruby-operator"><</span> <span class="ruby-value">0</span>
|
|
18
|
-
<span class="ruby-identifier">radians</span>
|
|
19
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
20
|
-
</body>
|
|
21
|
-
</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>constrain_value (Zyps::Utility)</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/zyps.rb, line 450</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Utility</span>.<span class="ruby-identifier">constrain_value</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">absolute_maximum</span>)
|
|
15
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">value</span>.<span class="ruby-identifier">abs</span> <span class="ruby-operator">></span> <span class="ruby-identifier">absolute_maximum</span>) <span class="ruby-keyword kw">then</span>
|
|
16
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">>=</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">then</span>
|
|
17
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">absolute_maximum</span>
|
|
18
|
-
<span class="ruby-keyword kw">else</span>
|
|
19
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">absolute_maximum</span> <span class="ruby-operator">*</span> <span class="ruby-value">-1</span>
|
|
20
|
-
<span class="ruby-keyword kw">end</span>
|
|
21
|
-
<span class="ruby-keyword kw">end</span>
|
|
22
|
-
<span class="ruby-identifier">value</span>
|
|
23
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
24
|
-
</body>
|
|
25
|
-
</html>
|
|
@@ -1,21 +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>find_reflection_angle (Zyps::Utility)</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/zyps.rb, line 462</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Utility</span>.<span class="ruby-identifier">find_reflection_angle</span>(<span class="ruby-identifier">normal</span>, <span class="ruby-identifier">angle</span>)
|
|
15
|
-
<span class="ruby-identifier">incidence_angle</span> = <span class="ruby-identifier">normal</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">angle</span>
|
|
16
|
-
<span class="ruby-identifier">reflection_angle</span> = <span class="ruby-identifier">normal</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">incidence_angle</span>
|
|
17
|
-
<span class="ruby-identifier">reflection_angle</span> <span class="ruby-operator">%=</span> <span class="ruby-value">360</span>
|
|
18
|
-
<span class="ruby-identifier">reflection_angle</span>
|
|
19
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
20
|
-
</body>
|
|
21
|
-
</html>
|