diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-10-03 02:37:49 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-10-03 02:37:49 +0200 |
| commit | cf990976ba9eb26ed7867dfb4199f3fc013c9930 (patch) | |
| tree | d23f887c2c07c4283961a08a65c5e1adac24b77d /src/main/java/at/hannibal2/skyhanni/utils | |
| parent | 8bb0a6262715a46d31c7a89c0b82aa07b60cf045 (diff) | |
| download | SkyHanni-cf990976ba9eb26ed7867dfb4199f3fc013c9930.tar.gz SkyHanni-cf990976ba9eb26ed7867dfb4199f3fc013c9930.tar.bz2 SkyHanni-cf990976ba9eb26ed7867dfb4199f3fc013c9930.zip | |
added diana features
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt index 0d70b5e5a..6d55a9185 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt @@ -76,6 +76,12 @@ data class LorenzVec( fun isZero(): Boolean = x == 0.0 && y == 0.0 && z == 0.0 + fun clone(): LorenzVec = LorenzVec(x, y, z) + + fun toDoubleArray(): Array<Double> { + return arrayOf(x, y, z) + } + companion object { fun getFromYawPitch(yaw: Double, pitch: Double): LorenzVec { val yaw: Double = (yaw + 90) * Math.PI / 180 @@ -109,4 +115,8 @@ fun Entity.getLorenzVec(): LorenzVec = LorenzVec(posX, posY, posZ) fun Vec3.toLorenzVec(): LorenzVec = LorenzVec(xCoord, yCoord, zCoord) -fun Rotations.toLorenzVec(): LorenzVec = LorenzVec(x, y, z)
\ No newline at end of file +fun Rotations.toLorenzVec(): LorenzVec = LorenzVec(x, y, z) + +fun Array<Double>.toLorenzVec(): LorenzVec { + return LorenzVec(this[0], this[1], this[2]) +}
\ No newline at end of file |
