Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoikLectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Goik Martin
GoikLectures
Commits
e781fe5e
Commit
e781fe5e
authored
11 years ago
by
Goik Martin
Browse files
Options
Downloads
Patches
Plain Diff
Missing <co>
parent
a4e09066
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sd1/swd1.xml
+5
-3
5 additions, 3 deletions
Sd1/swd1.xml
with
5 additions
and
3 deletions
Sd1/swd1.xml
+
5
−
3
View file @
e781fe5e
...
...
@@ -2468,8 +2468,9 @@ for (...) {
<para>
We may then modify our loop to exclude lobster coordinate
positions
<coref
linkend=
"sd1ListingExcludeLobsterCircle"
/>
falling inside a circle of radius minimalLobsterCrabDistance
surrounding our crab:
</para>
falling inside a circle of radius
<emphasis
role=
"bold"
>
minimalLobsterCrabDistance
</emphasis>
surrounding
our crab:
</para>
<programlisting>
public void populateWorld() {
...
...
@@ -2495,7 +2496,8 @@ for (...) {
// We only add a lobster at coordinate position (lobsterX|lobsterY) if
// its distance to our crab is sufficiently large.
//
if (
<emphasis
role=
"bold"
>
minimalLobsterCrabDistance * minimalLobsterCrabDistance
<
</emphasis>
// Distance between lobster and crab is
if (
<emphasis
role=
"bold"
>
minimalLobsterCrabDistance * minimalLobsterCrabDistance
<
</emphasis>
<co
xml:id=
"sd1ListingExcludeLobsterCircle"
/>
// Distance between lobster and crab is
<emphasis
role=
"bold"
>
deltaX * deltaX + deltaY * deltaY
</emphasis>
) { // larger than minimalLobsterCrabDistance.
addObject(new Lobster(getRandomRotation()), lobsterX, lobsterY);
numLobsters++;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment