File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
plotters/src/style/colors Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -85,14 +85,14 @@ pub fn calculate_relative_difference_index_lower_upper<
85
85
h : FloatType ,
86
86
min : FloatType ,
87
87
max : FloatType ,
88
- n_colors : usize ,
88
+ n_steps : usize ,
89
89
) -> ( FloatType , usize , usize ) {
90
90
// Ensure that we do have a value in bounds
91
91
let h = num_traits:: clamp ( h, min, max) ;
92
92
// Next calculate a normalized value between 0.0 and 1.0
93
93
let t = ( h - min) / ( max - min) ;
94
94
let approximate_index =
95
- t * ( FloatType :: from_usize ( n_colors ) . unwrap ( ) - FloatType :: one ( ) ) . max ( FloatType :: zero ( ) ) ;
95
+ t * ( FloatType :: from_usize ( n_steps ) . unwrap ( ) - FloatType :: one ( ) ) . max ( FloatType :: zero ( ) ) ;
96
96
// Calculate which index are the two most nearest of the supplied value
97
97
let index_lower = approximate_index. floor ( ) . to_usize ( ) . unwrap ( ) ;
98
98
let index_upper = approximate_index. ceil ( ) . to_usize ( ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments