MathType

Math - methods related to mathematical calculations

Static methods of the Math type:

  • BigDecimal.sqrt: square root
  • BigDecimal.abs: Absolute value
  • BigDecimal.max: take the larger of the two
  • BigDecimal.min: take the smaller of the two
  • BigDecimal.ceil: round up
  • BigDecimal.floor: round down
  • BigDecimal.round: rounded
    example:
log.info(Math.sqrt(16)) //square root
log.info(Math.abs(-1)) //Take the absolute value
log.info(Math.max(10,16)) //Take the larger of the two
log.info(Math.min(10,16)) //take the smaller of the two
log.info(Math.ceil(7.5 as double)) //round up
log.info(Math.floor(7.9 as double)) // round down
log.info(Math.round(7.5 as double)) //round up
2022-11-22
0 0