We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c68e506 commit f1e2a10Copy full SHA for f1e2a10
src/Math-CompatibilityUpToPharo11/SequenceableCollection.extension.st
@@ -0,0 +1,11 @@
1
+Extension { #name : #SequenceableCollection }
2
+
3
+{ #category : #'*Math-CompatibilityUpToPharo11' }
4
+SequenceableCollection >> closeTo: aSequenceableCollection precision: aPrecision [
5
+ "Return true if all my elements are close to the elements of same index of the parameter with a certain precision"
6
7
+ "(#(1.9283 2.3029) closeTo: #(1.9284 2.3028) precision: 0.001) >>> true"
8
9
+ self with: aSequenceableCollection do: [ :a :b | (a closeTo: b precision: aPrecision) ifFalse: [ ^ false ] ].
10
+ ^ true
11
+]
0 commit comments