diff --git a/README.md b/README.md index e3c089e..6133144 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The simple multiplatform helper for build [Bezier curves](https://en.wikipedia.o ## Install ```gradle -implementation 'ru.ztrap:beziercurve:1.0.3' +implementation 'ru.ztrap:beziercurve:1.0.4' ``` ## Usage @@ -19,8 +19,8 @@ val startScene = BezierScene(3f, 7f, 21f, 17f) val endScene = BezierScene(6f, 6f, 18f, 18f) val curve = BezierCurve( - startScene.left to startScene.centerY, - endScene.centerX to endScene.centerY + start = startScene.left to startScene.centerY, + end = endScene.centerX to endScene.centerY, ) ``` diff --git a/convention-plugins/src/main/kotlin/PublishingInfo.kt b/convention-plugins/src/main/kotlin/PublishingInfo.kt index 6302159..245de32 100644 --- a/convention-plugins/src/main/kotlin/PublishingInfo.kt +++ b/convention-plugins/src/main/kotlin/PublishingInfo.kt @@ -16,14 +16,14 @@ object PublishingInfo { } object License { - const val NAME = "the apache software license, version 2.0" - const val URL = "http://www.apache.org/licenses/license-2.0.txt" + const val NAME = "Apache-2.0 license" + const val URL = "https://www.apache.org/licenses/LICENSE-2.0" const val DIST = "repo" } object Developer { - const val ID = "ztrap" - const val NAME = "peter gulko" + const val ID = "zTrap" + const val NAME = "Peter Gulko" const val EMAIL = "ztrap.developer@gmail.com" } @@ -31,6 +31,6 @@ object PublishingInfo { const val ID = BASE_ARTIFACT_NAME const val NAME = "Bezier curves creator" const val DESCRIPTION = "The simple multiplatform helper for build Bezier curves" - const val VERSION = "1.0.3" + const val VERSION = "1.0.4" } } \ No newline at end of file diff --git a/src/commonMain/kotlin/ru/ztrap/bezier/curve/BezierCurve.kt b/src/commonMain/kotlin/ru/ztrap/bezier/curve/BezierCurve.kt index bca4389..89632ca 100644 --- a/src/commonMain/kotlin/ru/ztrap/bezier/curve/BezierCurve.kt +++ b/src/commonMain/kotlin/ru/ztrap/bezier/curve/BezierCurve.kt @@ -7,7 +7,7 @@ private val APPLICABLE_VALUES = 0f..1f public data class BezierCurve( val start: Point, val end: Point, - val controls: List, + val controls: List = emptyList(), ) { /** @@ -18,7 +18,7 @@ public data class BezierCurve( public constructor( start: Pair, end: Pair, - controls: List>, + controls: List> = emptyList(), ) : this( start = Point(start.x, start.y), end = Point(end.x, end.y),