From 7b5e4051fcb717aa2fa65256598bb6ea800bdee4 Mon Sep 17 00:00:00 2001 From: Saraansh Wadkar Date: Wed, 11 Jan 2023 22:50:45 -0500 Subject: [PATCH] add wpilib constructor for transform 3d --- build.gradle | 2 +- src/main/kotlin/org/team4099/lib/geometry/Transform3d.kt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5465a37..d9d4cf9 100644 --- a/build.gradle +++ b/build.gradle @@ -51,7 +51,7 @@ publishing { release(MavenPublication) { groupId = 'org.team4099' artifactId = 'falconutils' - version = '1.0.2' + version = '1.0.3' from(components["kotlin"]) } diff --git a/src/main/kotlin/org/team4099/lib/geometry/Transform3d.kt b/src/main/kotlin/org/team4099/lib/geometry/Transform3d.kt index 653d6c7..bc925a1 100644 --- a/src/main/kotlin/org/team4099/lib/geometry/Transform3d.kt +++ b/src/main/kotlin/org/team4099/lib/geometry/Transform3d.kt @@ -14,6 +14,10 @@ class Transform3d(val translation: Translation3d, val rotation: Rotation3d) { last.rotation.minus(initial.rotation) ) + constructor( + transform3dWPILIB: Transform3dWPILIB + ) : this(Translation3d(transform3dWPILIB.translation), Rotation3d(transform3dWPILIB.rotation)) {} + constructor() : this(Translation3d(), Rotation3d()) operator fun times(scalar: Double): Transform3d {