code: public static double TruncatedPower(double value, double degree) {
          double x = Math.pow(value, degree);
          return (x > 0) ? x : 0.0;
      }
docs: Truncated power function.
  
  @param value  Value.
  @param degree Degree.
  @return Result.