Skip to content

Commit

Permalink
Remove radianDiff
Browse files Browse the repository at this point in the history
  • Loading branch information
tekezo committed Dec 31, 2023
1 parent 10b1bc5 commit 3149e4d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
9 changes: 0 additions & 9 deletions appendix/GamePadViewer/src/StickManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public class StickManager: ObservableObject {
@Published var vertical = StickSensor()
@Published var radian = 0.0
@Published var magnitude = 0.0
@Published var radianDiff = 0.0
@Published var deltaHorizontal = 0.0
@Published var deltaVertical = 0.0
@Published var deltaRadian = 0.0
Expand Down Expand Up @@ -103,13 +102,5 @@ public class StickManager: ObservableObject {
}
}

static public func radianDifference(_ r1: Double, _ r2: Double) -> Double {
let diff = abs(r1 - r2).truncatingRemainder(dividingBy: 2 * Double.pi)
if diff > Double.pi {
return 2 * Double.pi - diff
}
return diff
}

@Published var rightStick = Stick()
}
1 change: 0 additions & 1 deletion appendix/GamePadViewer/src/View/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ struct InformationView: View {
}
Divider()
Group {
Text("radianDiff \(rightStick.radianDiff)")
Text("deltaHorizontal: \(rightStick.deltaHorizontal)")
Text("deltaVertical: \(rightStick.deltaVertical)")
Text("deltaRadian: \(rightStick.deltaRadian)")
Expand Down

0 comments on commit 3149e4d

Please sign in to comment.