ComplexFloatArray.st
changeset 4657 a2eb42a52e8b
parent 4654 8d88bdbad647
--- a/ComplexFloatArray.st	Sun May 06 03:19:57 2018 +0200
+++ b/ComplexFloatArray.st	Sun May 06 03:20:05 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2018 by Claus Gittinger
               All Rights Reserved
@@ -134,6 +136,28 @@
     baseIdx := index * 2.
     self basicAt:(baseIdx - 1) put:aComplex real.
     self basicAt:(baseIdx) put:aComplex imaginary.
+!
+
+at:index put:realPart i:imaginaryPart
+    |baseIdx|
+
+    baseIdx := index * 2.
+    self basicAt:(baseIdx - 1) put:realPart.
+    self basicAt:(baseIdx) put:imaginaryPart.
+!
+
+imaginaryAt:index
+    |baseIdx|
+
+    baseIdx := index * 2.
+    ^ (self basicAt:(baseIdx))
+!
+
+realAt:index
+    |baseIdx|
+
+    baseIdx := index * 2.
+    ^ (self basicAt:(baseIdx - 1))
 ! !
 
 !ComplexFloatArray methodsFor:'queries'!