Skip to content
  • Mark OLESEN's avatar
    ENH: use GeometricField clamp_min, clamp_max, clamp_range · 3d8a6a54
    Mark OLESEN authored
    - newer naming allows for less confusing code.
      Eg,
          max(lower)  ->  clamp_min(lower)
          min(upper)  ->  clamp_max(upper)
    
    - prefer combined method, for few operations.
      Eg,
          max(lower) + min(upper) -> clamp_range(lower, upper)
    
      The updated naming also helps avoid some obvious coding errors.
      Eg,
    
         Re.min(1200.0);
         Re.max(18800.0);
    
      instead of
         Re.clamp_range(1200.0, 18800.0);
    
    - can also use implicit conversion of zero_one to MinMax<Type> for
      this type of code:
    
          lambda_.clamp_range(zero_one{});
    3d8a6a54