Working with scales in continuous pitch space, many pitches and intervals
are irrationals represented as floating point numbers. This can cause
arithmetic and rounding errors, leading to it looking like there are
more distinct pitches/intervals in the set than there really are. Use
fpunique
rather than base::unique()
whenever you handle scales in continuous
pitch space.
Arguments
- x
Numeric array whose unique elements are to be determined
- MARGIN
Numeric
0
,1
, or2
depending on whether you want unique individual numbers, unique rows, or unique columns, respectively. Defaults to0
.- rounder
Numeric (expected integer), defaults to
10
: number of decimal places to round to when testing for equality.