-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
22 additions
and
40 deletions.
There are no files selected for viewing
5 changes: 4 additions & 1 deletion
5
api/src/main/kotlin/nebulosa/api/calibration/CalibrationFrameEntity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
nebulosa-guiding-internal/src/main/kotlin/nebulosa/guiding/internal/GuidePoint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,8 @@ | ||
package nebulosa.guiding.internal | ||
|
||
import nebulosa.math.Angle | ||
import nebulosa.math.Point2D | ||
import nebulosa.math.rad | ||
import kotlin.math.atan2 | ||
import kotlin.math.hypot | ||
|
||
interface GuidePoint : Point2D { | ||
|
||
val valid: Boolean | ||
|
||
fun dX(point: Point2D): Double { | ||
return x - point.x | ||
} | ||
|
||
fun dY(point: Point2D): Double { | ||
return y - point.y | ||
} | ||
|
||
val distance | ||
get() = hypot(x, y) | ||
|
||
val angle | ||
get() = atan2(y, x).rad | ||
|
||
fun angle(point: Point2D): Angle { | ||
return atan2(dY(point), dX(point)).rad | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters