forked from pointfreeco/swift-composable-architecture
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80f44fb
commit 8cc8492
Showing
13 changed files
with
1,045 additions
and
1,041 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Examples/CaseStudies/tvOSCaseStudiesTests/tvOSCaseStudiesTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import XCTest | ||
|
||
@testable import tvOSCaseStudies | ||
|
||
class tvOSCaseStudiesTests: XCTestCase { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#if canImport(CoreMotion) | ||
@_exported import ComposableArchitecture | ||
@_exported import CoreMotion | ||
@_exported import ComposableArchitecture | ||
@_exported import CoreMotion | ||
#endif |
34 changes: 17 additions & 17 deletions
34
Sources/ComposableCoreMotion/Models/AccelerometerData.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
#if canImport(CoreMotion) | ||
import CoreMotion | ||
import CoreMotion | ||
|
||
/// A data sample from the device's three accelerometers. | ||
/// | ||
/// See the documentation for `CMAccelerometerData` for more info. | ||
public struct AccelerometerData: Equatable { | ||
public var acceleration: CMAcceleration | ||
/// A data sample from the device's three accelerometers. | ||
/// | ||
/// See the documentation for `CMAccelerometerData` for more info. | ||
public struct AccelerometerData: Equatable { | ||
public var acceleration: CMAcceleration | ||
|
||
public init(_ accelerometerData: CMAccelerometerData) { | ||
self.acceleration = accelerometerData.acceleration | ||
} | ||
public init(_ accelerometerData: CMAccelerometerData) { | ||
self.acceleration = accelerometerData.acceleration | ||
} | ||
|
||
public init(acceleration: CMAcceleration) { | ||
self.acceleration = acceleration | ||
} | ||
public init(acceleration: CMAcceleration) { | ||
self.acceleration = acceleration | ||
} | ||
|
||
public static func == (lhs: Self, rhs: Self) -> Bool { | ||
lhs.acceleration.x == rhs.acceleration.x | ||
&& lhs.acceleration.y == rhs.acceleration.y | ||
&& lhs.acceleration.z == rhs.acceleration.z | ||
public static func == (lhs: Self, rhs: Self) -> Bool { | ||
lhs.acceleration.x == rhs.acceleration.x | ||
&& lhs.acceleration.y == rhs.acceleration.y | ||
&& lhs.acceleration.z == rhs.acceleration.z | ||
} | ||
} | ||
} | ||
#endif |
Oops, something went wrong.