0.3.1-dev-11 #510

Merged
altavir merged 80 commits from dev into master 2023-04-05 18:46:36 +03:00
2 changed files with 0 additions and 46 deletions
Showing only changes of commit 8998a394b3 - Show all commits

View File

@ -27,7 +27,6 @@ public fun <V : Vector> LineSegment<V>.line(algebra: GeometrySpace<V>): Line<V>
Line(begin, end - begin) Line(begin, end - begin)
} }
public fun Double.equalFloat(other: Double, maxFloatDelta: Double = 0.000001): public fun Double.equalFloat(other: Double, maxFloatDelta: Double = 0.000001):
Boolean = kotlin.math.abs(this - other) < maxFloatDelta Boolean = kotlin.math.abs(this - other) < maxFloatDelta

View File

@ -1,45 +0,0 @@
/*
* Copyright 2018-2023 KMath contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
//package space.kscience.kmath.geometry
//
//import space.kscience.kmath.geometry.Euclidean2DSpace.equalLineSegments
//import space.kscience.kmath.geometry.Euclidean2DSpace.vector
//import kotlin.test.Test
//import kotlin.test.assertEquals
//import kotlin.test.assertTrue
//
//class TangentTest {
// @Test
// fun tangent() {
// val c1 = Circle2D(vector(0.0, 0.0), 1.0)
// val c2 = Circle2D(vector(4.0, 0.0), 1.0)
// val routes = arrayListOf<DubinsRoutes>(
// DubinsRoutes.RSR,
// DubinsRoutes.RSL,
// DubinsRoutes.LSR,
// DubinsRoutes.LSL
// )
// val segments = arrayListOf<LineSegment<DoubleVector2D>>(
// LineSegment<DoubleVector2D>(begin = vector(0.0, 1.0),
// end = vector(4.0, 1.0)),
// LineSegment<DoubleVector2D>(begin = vector(0.5, 0.8660254),
// end = vector(3.5, -0.8660254)),
// LineSegment<DoubleVector2D>(begin = vector(0.5, -0.8660254),
// end = vector(3.5, 0.8660254)),
// LineSegment<DoubleVector2D>(begin = vector(0.0, -1.0),
// end = vector(4.0, -1.0))
// )
//
// val tangentMap = c1.tangentsToCircle(c2)
// val tangentMapKeys = tangentMap.keys.toList()
// val tangentMapValues = tangentMap.values.toList()
//
// assertEquals(routes, tangentMapKeys)
// for (i in segments.indices) {
// assertTrue(equalLineSegments(segments[i], tangentMapValues[i]))
// }
// }
//}