diff --git a/Source/ConstraintMakerPriortizable.swift b/Source/ConstraintMakerPriortizable.swift index ef79448..66aabe6 100644 --- a/Source/ConstraintMakerPriortizable.swift +++ b/Source/ConstraintMakerPriortizable.swift @@ -31,8 +31,8 @@ public class ConstraintMakerPriortizable: ConstraintMakerFinalizable { @discardableResult - public func priority(_ amount: ConstraintPriority) -> ConstraintMakerFinalizable { - self.description.priority = amount.value + public func priority(_ amount: ConstraintPriority, offset: Float = 0) -> ConstraintMakerFinalizable { + self.description.priority = amount.value + offset return self } diff --git a/Source/ConstraintPriority.swift b/Source/ConstraintPriority.swift index f5ff4f4..7299fa9 100644 --- a/Source/ConstraintPriority.swift +++ b/Source/ConstraintPriority.swift @@ -28,7 +28,7 @@ #endif -public struct ConstraintPriority : ExpressibleByFloatLiteral, Strideable, Equatable { +public struct ConstraintPriority : ExpressibleByFloatLiteral, Equatable { public typealias FloatLiteralType = Float public let value: Float @@ -62,14 +62,6 @@ public struct ConstraintPriority : ExpressibleByFloatLiteral, Strideable, Equata return 250.0 } - public func advanced(by n: Float) -> ConstraintPriority { - return ConstraintPriority(self.value + n) - } - - public func distance(to other: ConstraintPriority) -> Float { - return other.value - self.value - } - public static func ==(lhs: ConstraintPriority, rhs: ConstraintPriority) -> Bool { return lhs.value == rhs.value }