fix: PhysicsModifier body function + Angle type
All checks were successful
Security Checks / dependency-audit (push) Successful in 14s
Security Checks / secret-scanning (push) Successful in 4s
Security Checks / dockerfile-lint (push) Successful in 3s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Yusuf Suleman
2026-04-03 10:31:12 -05:00
parent c6f6e6f6b9
commit aa4ce6875a

View File

@@ -211,14 +211,14 @@ struct PhysicsModifier: ViewModifier {
private let gravity: CGFloat = 0.6
private let duration: Double = 1.6
var body: some View {
func body(content: Content) -> some View {
let x = startX + vx * time
let y = startY + vy * time + 0.5 * gravity * time * time
content
.offset(x: x, y: y)
.opacity(opacity)
.rotationEffect(.degrees(spin * Double(time / 30)))
.rotationEffect(Angle.degrees(spin * Double(time / 30)))
.onAppear {
withAnimation(.easeOut(duration: duration).delay(delay)) {
time = 30