Skip to content

Commit 8bb3459

Browse files
author
Antoine Cailliau
committed
Document and various fixes for Particle and Spring
1 parent 0ca8cbc commit 8bb3459

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

Physics/Particle.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public double YForce {
8888
/// </summary>
8989
public double Mass {
9090
get;
91-
set;
91+
private set;
9292
}
9393

9494
/// <summary>
@@ -116,7 +116,7 @@ public Particle ()
116116
/// and the given mass.
117117
/// </summary>
118118
/// <param name="mass">
119-
/// A <see cref="System.Double"/> representing the mass.
119+
/// A <see cref="T:System.Double"/> representing the mass.
120120
/// </param>
121121
public Particle (double mass)
122122
{
@@ -128,10 +128,10 @@ public Particle (double mass)
128128
/// null speed and the given mass.
129129
/// </summary>
130130
/// <param name="x">
131-
/// A <see cref="System.Double"/> representing the x-coordinate
131+
/// A <see cref="T:System.Double"/> representing the x-coordinate
132132
/// </param>
133133
/// <param name="y">
134-
/// A <see cref="System.Double"/> representing the y-coordinate
134+
/// A <see cref="T:System.Double"/> representing the y-coordinate
135135
/// </param>
136136
public Particle (double x, double y)
137137
: this()
@@ -145,13 +145,13 @@ public Particle (double x, double y)
145145
/// of null speed and with given mass.
146146
/// </summary>
147147
/// <param name="x">
148-
/// A <see cref="System.Double"/> representing the x-coordinate
148+
/// A <see cref="T:System.Double"/> representing the x-coordinate
149149
/// </param>
150150
/// <param name="y">
151-
/// A <see cref="System.Double"/> representing the y-coordinate
151+
/// A <see cref="T:System.Double"/> representing the y-coordinate
152152
/// </param>
153153
/// <param name="mass">
154-
/// A <see cref="System.Double"/> representing the mass
154+
/// A <see cref="T:System.Double"/> representing the mass
155155
/// </param>
156156
public Particle (double x, double y, double mass)
157157
: this(x, y)
@@ -164,16 +164,16 @@ public Particle (double x, double y, double mass)
164164
/// of given speed and of unitary mass.
165165
/// </summary>
166166
/// <param name="x">
167-
/// A <see cref="System.Double"/> representing the x-coordinate.
167+
/// A <see cref="T:System.Double"/> representing the x-coordinate.
168168
/// </param>
169169
/// <param name="y">
170-
/// A <see cref="System.Double"/> representing the y-coordinate.
170+
/// A <see cref="T:System.Double"/> representing the y-coordinate.
171171
/// </param>
172172
/// <param name="xSpeed">
173-
/// A <see cref="System.Double"/> representing the speed along the x-axis.
173+
/// A <see cref="T:System.Double"/> representing the speed along the x-axis.
174174
/// </param>
175175
/// <param name="ySpeed">
176-
/// A <see cref="System.Double"/> representing the speed along the y-axis.
176+
/// A <see cref="T:System.Double"/> representing the speed along the y-axis.
177177
/// </param>
178178
public Particle (double x, double y, double xSpeed, double ySpeed)
179179
: this(x, y)
@@ -187,21 +187,21 @@ public Particle (double x, double y, double xSpeed, double ySpeed)
187187
/// speed given and of given mass.
188188
/// </summary>
189189
/// <param name="x">
190-
/// A <see cref="System.Double"/> representing the x-coordinate.
190+
/// A <see cref="T:System.Double"/> representing the x-coordinate.
191191
/// </param>
192192
/// <param name="y">
193-
/// A <see cref="System.Double"/> representing the y-coordinate.
193+
/// A <see cref="T:System.Double"/> representing the y-coordinate.
194194
/// </param>
195195
/// <param name="xSpeed">
196-
/// A <see cref="System.Double"/> representing the speed along the
196+
/// A <see cref="T:System.Double"/> representing the speed along the
197197
/// x-axis.
198198
/// </param>
199199
/// <param name="ySpeed">
200-
/// A <see cref="System.Double"/> representing the speed along the
200+
/// A <see cref="T:System.Double"/> representing the speed along the
201201
/// y-axis.
202202
/// </param>
203203
/// <param name="mass">
204-
/// A <see cref="System.Double"/> representing the mass of the
204+
/// A <see cref="T:System.Double"/> representing the mass of the
205205
/// particle.
206206
/// </param>
207207
public Particle (double x, double y, double xSpeed, double ySpeed, double mass)

Physics/Spring.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,32 +88,32 @@ public T Value {
8888
/// unitary length and strenght.
8989
/// </summary>
9090
/// <param name="p1">
91-
/// A <see cref="Particle"/> representing one particle.
91+
/// A <see cref="T:Smog.Particle"/> representing one particle.
9292
/// </param>
9393
/// <param name="p2">
94-
/// A <see cref="Particle"/> representing the other particle.
94+
/// A <see cref="T:Smog.Particle"/> representing the other particle.
9595
/// </param>
9696
public Spring (Particle<S> p1, Particle<S> p2)
9797
{
9898
Particle1 = p1;
9999
Particle2 = p2;
100100
Strenght = 1;
101101
Length = 1;
102-
Damping = Length / 10;
102+
Damping = 1;//Length / 10;
103103
}
104104

105105
/// <summary>
106106
/// Creates a new spring between the two given particles, of unitary
107107
/// length and given strenght.
108108
/// </summary>
109109
/// <param name="particle1">
110-
/// A <see cref="Particle"/> representing one particle.
110+
/// A <see cref="T:Smog.Particle"/> representing one particle.
111111
/// </param>
112112
/// <param name="particle2">
113-
/// A <see cref="Particle"/> representing the other particle.
113+
/// A <see cref="T:Smog.Particle"/> representing the other particle.
114114
/// </param>
115115
/// <param name="strenght">
116-
/// A <see cref="System.Double"/> representing the strenght of the
116+
/// A <see cref="T:System.Double"/> representing the strenght of the
117117
/// spring.
118118
/// </param>
119119
public Spring (Particle<S> particle1, Particle<S> particle2, double strenght)
@@ -127,17 +127,17 @@ public Spring (Particle<S> particle1, Particle<S> particle2, double strenght)
127127
/// and strenght.
128128
/// </summary>
129129
/// <param name="particle1">
130-
/// A <see cref="Particle"/> representing one particle.
130+
/// A <see cref="T:Smog.Particle"/> representing one particle.
131131
/// </param>
132132
/// <param name="particle2">
133-
/// A <see cref="Particle"/> representing the other particle.
133+
/// A <see cref="T:Smog.Particle"/> representing the other particle.
134134
/// </param>
135135
/// <param name="strenght">
136-
/// A <see cref="System.Double"/> representing the strenght of the
136+
/// A <see cref="T:System.Double"/> representing the strenght of the
137137
/// spring.
138138
/// </param>
139139
/// <param name="length">
140-
/// A <see cref="System.Double"/> representing the length of the
140+
/// A <see cref="T:System.Double"/> representing the length of the
141141
/// spring.
142142
/// </param>
143143
public Spring (Particle<S> particle1, Particle<S> particle2, double strenght, double length)
@@ -152,21 +152,21 @@ public Spring (Particle<S> particle1, Particle<S> particle2, double strenght, do
152152
/// and strenght. The damping factor is equal to the given one.
153153
/// </summary>
154154
/// <param name="particle1">
155-
/// A <see cref="Particle"/> representing one particle.
155+
/// A <see cref="T:Smog.Particle"/> representing one particle.
156156
/// </param>
157157
/// <param name="particle2">
158-
/// A <see cref="Particle"/> representing the other particle.
158+
/// A <see cref="T:Smog.Particle"/> representing the other particle.
159159
/// </param>
160160
/// <param name="strenght">
161-
/// A <see cref="System.Double"/> representing the strenght of the
161+
/// A <see cref="T:System.Double"/> representing the strenght of the
162162
/// spring.
163163
/// </param>
164164
/// <param name="length">
165-
/// A <see cref="System.Double"/> representing the length of the
165+
/// A <see cref="T:System.Double"/> representing the length of the
166166
/// spring.
167167
/// </param>
168168
/// <param name="damping">
169-
/// A <see cref="System.Double"/> representing the damping factor of
169+
/// A <see cref="T:System.Double"/> representing the damping factor of
170170
/// the spring.
171171
/// </param>
172172
public Spring (Particle<S> particle1, Particle<S> particle2, double strenght, double length, double damping)

0 commit comments

Comments
 (0)