Skip to content

Commit

Permalink
corrected use of options pattern, see #161
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed May 18, 2022
1 parent 81a4380 commit 0eaa6b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/BinMapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ class BinMapper {
private readonly numBins: number;
private readonly options: BinMapperOptions;

constructor( valueRange: Range, numBins: number, options?: BinMapperOptions ) {
constructor( valueRange: Range, numBins: number, providedOptions?: BinMapperOptions ) {

// parameter checking
assert && assert( numBins > 0 );

options = optionize<BinMapperOptions, BinMapperOptions>()( {
const options = optionize<BinMapperOptions, BinMapperOptions>()( {
tolerateOutOfRangeValues: false
}, options );
}, providedOptions );

this.minValue = valueRange.min;
this.maxValue = valueRange.max;
Expand Down

0 comments on commit 0eaa6b0

Please sign in to comment.