NoteNumberRepresentable
public protocol NoteNumberRepresentable:
NewType,
Hashable,
Comparable,
SignedNumeric,
ExpressibleByFloatLiteral
Protocol defining values representable by a NoteNumber.
-
The
NoteNumberrepresentation of the instance ofNoteNumberRepresentabletype.Declaration
Swift
var value: NoteNumber { get }
-
init(_:)Default implementationCreate a
NoteNumberRepresentablevalue with givenNoteNumber.Default Implementation
Creates a
NoteNumberRepresentable-conforming type value with the givenDoublevalue.Creates a
NoteNumberRepresentable-conforming type value with another.Declaration
Swift
init(_ noteNumber: NoteNumber)
-
init(value:)Extension methodCreate a
NoteNumberRepresentablevalue 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
NoteNumberRepresentabletype.
-
==(_:_:)Extension methodDeclaration
Swift
public static func == (lhs: Self, rhs: Self) -> BoolReturn Value
trueif both values are representable by the sameNoteNumber. Otherwise,false.
-
<(_:_:)Extension methodDeclaration
Swift
public static func < (lhs: Self, rhs: Self) -> BoolReturn Value
trueif 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)
-
magnitudeExtension 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) -> SelfReturn 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) -> SelfReturn 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) -> SelfReturn 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 givensourcevalue.Declaration
Swift
public init?<T>(exactly source: T) where T : BinaryInteger
View on GitHub
Install in Dash
NoteNumberRepresentable Protocol Reference