Skip to content

Commit

Permalink
PR Improvement
Browse files Browse the repository at this point in the history
Use explicit `return`.
  • Loading branch information
ShivaHuang committed Jan 29, 2021
1 parent 4913be0 commit 57c63a3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/SwifterSwift/Foundation/MeasurementExtensions.swift
Expand Up @@ -10,42 +10,42 @@ public extension Measurement where UnitType == UnitAngle {
/// - Parameter value: The quantity of the angle in degree.
/// - Returns: Measurement for an angle with unit degrees.
static func degrees(_ value: Double) -> Measurement {
Measurement(value: value, unit: .degrees)
return Measurement(value: value, unit: .degrees)
}

/// SwifterSwift: Create a Measurement for an angle with a specified value in arc minutes.
/// - Parameter value: The quantity of the angle in arc minutes.
/// - Returns: Measurement for an angle with unit arc minutes.
static func arcMinutes(_ value: Double) -> Measurement {
Measurement(value: value, unit: .arcMinutes)
return Measurement(value: value, unit: .arcMinutes)
}

/// SwifterSwift: Create a Measurement for an angle with a specified value in arc seconds.
/// - Parameter value: The quantity of the angle in arc seconds.
/// - Returns: Measurement for an angle with unit arc seconds.
static func arcSeconds(_ value: Double) -> Measurement {
Measurement(value: value, unit: .arcSeconds)
return Measurement(value: value, unit: .arcSeconds)
}

/// SwifterSwift: Create a Measurement for an angle with a specified value in radians.
/// - Parameter value: The quantity of the angle in radians.
/// - Returns: Measurement for an angle with unit radians.
static func radians(_ value: Double) -> Measurement {
Measurement(value: value, unit: .radians)
return Measurement(value: value, unit: .radians)
}

/// SwifterSwift: Create a Measurement for an angle with a specified value in gradians.
/// - Parameter value: The quantity of the angle in gradians.
/// - Returns: Measurement for an angle with unit gradians.
static func gradians(_ value: Double) -> Measurement {
Measurement(value: value, unit: .gradians)
return Measurement(value: value, unit: .gradians)
}

/// SwifterSwift: Create a Measurement for an angle with a specified value in revolutions.
/// - Parameter value: The quantity of the angle in revolutions.
/// - Returns: Measurement for an angle with unit revolutions.
static func revolutions(_ value: Double) -> Measurement {
Measurement(value: value, unit: .revolutions)
return Measurement(value: value, unit: .revolutions)
}
}

Expand Down

0 comments on commit 57c63a3

Please sign in to comment.