Skip to content

Commit 8dbe917

Browse files
refactor: Rename Method, and now we have the interface that a client (in this case the test) needs.
1 parent 251c5b6 commit 8dbe917

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/Math-Polynomials/PMPolynomial.class.st

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,6 @@ PMPolynomial >> negated [
193193
^ self * -1
194194
]
195195

196-
{ #category : #information }
197-
PMPolynomial >> orderedRoots [
198-
"comment stating purpose of instance-side method"
199-
"scope: class-variables & instance-variables"
200-
201-
^ (self roots: Float defaultComparisonPrecision) asSortedCollection asArray
202-
]
203-
204196
{ #category : #printing }
205197
PMPolynomial >> printOn: aStream [
206198
"Append to aStream a written representation of the receiver."
@@ -239,6 +231,14 @@ PMPolynomial >> reciprocal [
239231
^ (PMPolynomial coefficients: #(1)) / self
240232
]
241233

234+
{ #category : #information }
235+
PMPolynomial >> roots [
236+
"comment stating purpose of instance-side method"
237+
"scope: class-variables & instance-variables"
238+
239+
^ (self roots: Float defaultComparisonPrecision) asSortedCollection asArray
240+
]
241+
242242
{ #category : #information }
243243
PMPolynomial >> roots: aNumber [
244244

src/Math-Tests-Polynomials/PMPolynomialTest.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ PMPolynomialTest >> testPolynomialRoots [
235235

236236
| polynomial roots |
237237
polynomial := PMPolynomial coefficients: #( -10 -13 -2 1 ).
238-
roots := polynomial orderedRoots .
238+
roots := polynomial roots .
239239
self assert: roots size equals: 3.
240240
self assert: (roots at: 1) + 2 closeTo: 0.
241241
self assert: (roots at: 2) + 1 closeTo: 0.

0 commit comments

Comments
 (0)