# PhysicsSystem

``public class PhysicsSystem: PhysicsSolving``
• ``` velocity ```

The velocity value to use in physics calculations.

#### Declaration

Swift

``public var velocity: Double``
• ``` friction ```

The friction value to be applied in physics calculations.

#### Declaration

Swift

``public var friction: Double``
• ``` timestamp ```

#### Declaration

Swift

``public var timestamp: TimeInterval = 0.0``
• ``` init(velocity:friction:) ```

Initializer.

#### Declaration

Swift

``public init(velocity: Double, friction: Double)``

#### Parameters

 ``` velocity ``` The velocity used to calculate new values in physics system. Any values are accepted due to the differing ranges of velocity magnitude required for various motion applications. Experiment to see what suits your needs best. ``` friction ``` The friction used to calculate new values in the physics system. Acceptable values are 0.0 (no friction) to 1.0 (no movement); values outside of this range will be clamped to the nearest edge.
• ``` solve(forPositions:timestamp:) ```

#### Declaration

Swift

``public func solve(forPositions positions: [Double], timestamp: TimeInterval) -> [Double]``
• ``` reset() ```

#### Declaration

Swift

``public func reset()``
• ``` pause() ```

#### Declaration

Swift

``public func pause()``
• ``` resume() ```

#### Declaration

Swift

``public func resume()``
• ``` reverseDirection() ```

#### Declaration

Swift

``public func reverseDirection()``