v0.2.0 #206

Merged
altavir merged 210 commits from dev into master 2021-02-21 16:33:25 +03:00
Showing only changes of commit 956ac6b74f - Show all commits

View File

@ -1,14 +1,14 @@
package kscience.kmath.complex package kscience.kmath.complex
import kscience.kmath.operations.invoke
import kotlin.math.sqrt import kotlin.math.sqrt
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals
import kotlin.test.assertTrue import kotlin.test.assertTrue
import kscience.kmath.operations.invoke
internal class ComplexTest { internal class ComplexTest {
@Test @Test
fun conjugate() = ComplexField { assertEquals(i * -42, (i * 42).conjugate) } fun conjugate() = ComplexField { assertEquals(i * 42, (i * -42).conjugate) }
@Test @Test
fun reciprocal() = ComplexField { assertTrue((Complex(0.5, -0.0) - 2.toComplex().reciprocal).r < 1e-10) } fun reciprocal() = ComplexField { assertTrue((Complex(0.5, -0.0) - 2.toComplex().reciprocal).r < 1e-10) }