NoteNumberRepresentable
public protocol NoteNumberRepresentable:
NewType,
Hashable,
Comparable,
SignedNumeric,
ExpressibleByFloatLiteral
Protocol defining values representable by a NoteNumber
.
-
The
NoteNumber
representation of the instance ofNoteNumberRepresentable
type.Declaration
Swift
var value: NoteNumber { get }
-
init(_:)
Default implementationCreate a
NoteNumberRepresentable
value with givenNoteNumber
.Default Implementation
Creates a
NoteNumberRepresentable
-conforming type value with the givenDouble
value.Creates a
NoteNumberRepresentable
-conforming type value with another.Declaration
Swift
init(_ noteNumber: NoteNumber)
-
init(value:)
Extension methodCreate a
NoteNumberRepresentable
value with givenNoteNumber
.Declaration
Swift
public init(value: NoteNumber)
-
hash(into:)
Extension methodDeclaration
Swift
public func hash(into hasher: inout Hasher)
Return Value
The hash value of a
NoteNumberRepresentable
type.
-
==(_:_:)
Extension methodDeclaration
Swift
public static func == (lhs: Self, rhs: Self) -> Bool
Return Value
true
if both values are representable by the sameNoteNumber
. Otherwise,false
.
-
<(_:_:)
Extension methodDeclaration
Swift
public static func < (lhs: Self, rhs: Self) -> Bool
Return Value
true
if the first value is less than the second value. Otherwise,false
.
-
init(floatLiteral:)
Extension methodCreates a
NoteNumberRepresentable
-conforming type with the given float literal.Declaration
Swift
public init(floatLiteral value: Double)
-
init(integerLiteral:)
Extension methodCreates a
NoteNumberRepresentable
-conforming type with the given integer literal.Declaration
Swift
public init(integerLiteral value: Int)
-
magnitude
Extension methodDeclaration
Swift
public var magnitude: NoteNumber.Magnitude { get }
Return Value
The magnitude of this
NoteNumberRepresentable
-conforming type value. -
+(_:_:)
Extension methodDeclaration
Swift
public static func + (lhs: Self, rhs: Self) -> Self
Return Value
The sum of the two given
NoteNumberRepresentable
-conforming type values. -
+=(_:_:)
Extension methodDeclaration
Swift
public static func += (lhs: inout Self, rhs: Self)
Return Value
Adds the right-hand-side value to the left-hand-side value.
-
-(_:_:)
Extension methodDeclaration
Swift
public static func - (lhs: Self, rhs: Self) -> Self
Return Value
The difference between the left-hand-side value and the right-hand-side value.
-
-=(_:_:)
Extension methodDeclaration
Swift
public static func -= (lhs: inout Self, rhs: Self)
Return Value
Subtracts the right-hand-side value from the left-hand-side value.
-
*(_:_:)
Extension methodDeclaration
Swift
public static func * (lhs: Self, rhs: Self) -> Self
Return Value
The product of the left-hand-side value and the right-hand-side value.
-
*=(_:_:)
Extension methodDeclaration
Swift
public static func *= (lhs: inout Self, rhs: Self)
Return Value
Multiplies the right-hand-side value by the left-hand-side value.
-
init(exactly:)
Extension methodCreates a
NoteNumberRepresentable
-conforming type value with the givensource
value.Declaration
Swift
public init?<T>(exactly source: T) where T : BinaryInteger