Skip to content

Commit

Permalink
[Paywalls] Fix shadow orientation by shifing initial position by 90º …
Browse files Browse the repository at this point in the history
…and making it rotate clockwise (#4634)
  • Loading branch information
MarkVillacampa authored Jan 7, 2025
1 parent 4672cbb commit 816f4ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions RevenueCatUI/Views/GradientView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ struct GradientView_Previews: PreviewProvider {
private extension UnitPoint {

init(angle: Angle) {
// Convert the angle to radians
let radians = angle.radians
// Convert the angle to radians and negate to make clockwise
// Subtract π/2 (90 degrees) to place an angle of 0 degrees at the top
let radians = -angle.radians - (.pi / 2)

// Calculate the normalized x and y positions
let xPosition = cos(radians)
Expand Down

0 comments on commit 816f4ca

Please sign in to comment.