File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff 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 }
205197PMPolynomial >> 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 }
243243PMPolynomial >> roots: aNumber [
244244
Original file line number Diff line number Diff 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 .
You can’t perform that action at this time.
0 commit comments