code: public static int trunc(EvaluationContext ctx, Object number) {
          return Conversions.toDecimal(number, ctx).setScale(0, RoundingMode.DOWN).intValue();
      }
docs: Truncates a number to an integer by removing the fractional part of the number