From c6f6191ef1701d5101544a81b37be5867f3ee686 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sun, 28 Jan 2024 18:15:33 +0300 Subject: [PATCH] Deprecate direct angle conversion --- .../src/main/kotlin/space/kscience/kmath/ejml/_generated.kt | 1 - .../commonMain/kotlin/space/kscience/kmath/geometry/angles.kt | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kmath-ejml/src/main/kotlin/space/kscience/kmath/ejml/_generated.kt b/kmath-ejml/src/main/kotlin/space/kscience/kmath/ejml/_generated.kt index 3a44a9e64..2948e990c 100644 --- a/kmath-ejml/src/main/kotlin/space/kscience/kmath/ejml/_generated.kt +++ b/kmath-ejml/src/main/kotlin/space/kscience/kmath/ejml/_generated.kt @@ -23,7 +23,6 @@ import space.kscience.attributes.SafeType import space.kscience.attributes.safeTypeOf import space.kscience.kmath.UnstableKMathAPI import space.kscience.kmath.linear.* -import space.kscience.kmath.linear.Matrix import space.kscience.kmath.nd.StructureFeature import space.kscience.kmath.operations.Float32Field import space.kscience.kmath.operations.Float64Field diff --git a/kmath-geometry/src/commonMain/kotlin/space/kscience/kmath/geometry/angles.kt b/kmath-geometry/src/commonMain/kotlin/space/kscience/kmath/geometry/angles.kt index 3855514fb..82a0424eb 100644 --- a/kmath-geometry/src/commonMain/kotlin/space/kscience/kmath/geometry/angles.kt +++ b/kmath-geometry/src/commonMain/kotlin/space/kscience/kmath/geometry/angles.kt @@ -74,6 +74,7 @@ public fun tan(angle: Angle): Double = kotlin.math.tan(angle.toRadians().value) public val Number.radians: Radians get() = Radians(toDouble()) +@Deprecated("Convert to radians", ReplaceWith("toRadians().value")) public val Angle.radians: Double get() = toRadians().value /** @@ -98,6 +99,7 @@ public value class Degrees(public val value: Double) : Angle { public val Number.degrees: Degrees get() = Degrees(toDouble()) +@Deprecated("Convert to degrees", ReplaceWith("toDegrees().value")) public val Angle.degrees: Double get() = toDegrees().value /**