File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -120,3 +120,11 @@ jobs:
120120 run : swift build --build-tests
121121 - name : Test
122122 run : swift test --skip-build
123+
124+ android :
125+ runs-on : ubuntu-latest
126+ steps :
127+ - name : Checkout
128+ uses : actions/checkout@v4
129+ - name : Build and Test
130+ uses : skiptools/swift-android-action@v2
Original file line number Diff line number Diff line change 3131
3232#if canImport(Darwin)
3333import Darwin. POSIX
34+ #elseif canImport(Android)
35+ import Android
3436#else
3537import Glibc
3638#endif
Original file line number Diff line number Diff line change 3131
3232#if canImport(Darwin)
3333import Darwin
34+ #elseif canImport(Android)
35+ import Android
3436#else
3537import Glibc
3638#endif
@@ -114,3 +116,15 @@ extension Array where Element == LayerTree.Transform {
114116 }
115117 }
116118}
119+
120+ #if os(Android)
121+ // The Android module does not have Float overloads for the various math functions
122+ func tan( _ value: Float ) -> Float { tanf ( value) }
123+ func atan( _ value: Float ) -> Float { atanf ( value) }
124+ func cos( _ value: Float ) -> Float { cosf ( value) }
125+ func acos( _ value: Float ) -> Float { acosf ( value) }
126+ func sin( _ value: Float ) -> Float { sinf ( value) }
127+ func asin( _ value: Float ) -> Float { asinf ( value) }
128+ func ceil( _ value: Float ) -> Float { ceilf ( value) }
129+ #endif
130+
You can’t perform that action at this time.
0 commit comments