Skip to content

Commit a585d96

Browse files
refactor: Rename Variable - it looks like it is a root.
1 parent 6ebf707 commit a585d96

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Math-Polynomials/PMPolynomial.class.st

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ PMPolynomial >> roots [
239239
{ #category : #information }
240240
PMPolynomial >> roots: aNumber [
241241

242-
| pol roots x rootFinder |
242+
| pol roots root rootFinder |
243243
rootFinder := PMNewtonZeroFinder with: aNumber.
244244
pol := self class coefficients:
245245
(coefficients reverse collect: [ :each | each asFloat ]).
@@ -248,10 +248,10 @@ PMPolynomial >> roots: aNumber [
248248
rootFinder
249249
setFunction: pol;
250250
setDerivative: pol derivative.
251-
x := rootFinder evaluate.
251+
root := rootFinder evaluate.
252252
rootFinder hasConverged ] whileTrue: [
253-
roots add: x.
254-
pol := pol deflatedAt: x.
253+
roots add: root.
254+
pol := pol deflatedAt: root.
255255
pol degree > 0 ifFalse: [ ^ roots ] ].
256256
^ roots
257257
]

0 commit comments

Comments
 (0)