Class BitwiseOperand

java.lang.Object
dev.frostlake.functions.scalar.math.BitwiseOperand

public final class BitwiseOperand extends Object
The whole number a bitwise function reads an argument as. Live rounds a fractional argument HALF AWAY FROM ZERO before the bit operation — BITAND(2.5, 1) is 1 (2.5 reads as 3), BITAND(2.4, 1) is 0, BITAND(-2.5, 1) is 1 (-3), BITNOT(2.5) is -4 and BITSHIFTLEFT(2.5, 1) is 6 — for a NUMBER, a FLOAT and a numeric text alike (live-verified). A truncating read gave the other answer on every one of them.
  • Method Details

    • whole

      public static long whole(Object value)
      The argument as the whole number the bit operation works on.
      Parameters:
      value - a number (a text argument has been read as one by the dispatch)
      Returns:
      the value rounded half away from zero