bbscript/stdlib/math.py
def cmd_math(ctx, op: str, left, right):
	"""
			To perform math operations.

			Parameters:
			-----------
			op: Math operation to perform
			left: left value
			right: right value

			Returns:
			--------
			value of the left and right parameter with respect to the op.

	"""
	type_fn = flt
	if isinstance(left, int):
		type_fn = cint
	if isinstance(right, int):
		type_fn = cint

	left = type_fn(left)
	right = type_fn(right)

	if op == "+":
		return left + right
	elif op == "-":
		return left - right
	elif op == "*":
		return left * right
	elif op == "/":
		return left / right
	elif op == "%":
		return left * (right / 100)
	elif op == "MOD":
		return math.fmod(left, right)
	elif op == "WRAP":
		return left % right

	raise InvalidOperation("op must be one of +, -, *, /, %, MOD")

			To perform math operations.

			Parameters:
			-----------
			op: Math operation to perform
			left: left value
			right: right value

			Returns:
			--------
			value of the left and right parameter with respect to the op.

	
To perform math operations.
Parameters.

Math operation to perform
left: left value
right: right value



value of the left and right parameter with respect to the op.
To perform math operations . Parameters . Math operation to perform left : left value right : right value value of the left and right parameter with respect to the op .
def cmd_math(ctx, op: str, left, right):
	type_fn = flt
	if isinstance(left, int):
		type_fn = cint
	if isinstance(right, int):
		type_fn = cint
	left = type_fn(left)
	right = type_fn(right)
	if op == "+":
		return left + right
	elif op == "-":
		return left - right
	elif op == "*":
		return left * right
	elif op == "/":
		return left / right
	elif op == "%":
		return left * (right / 100)
	elif op == "MOD":
		return math.fmod(left, right)
	elif op == "WRAP":
		return left % right
	raise InvalidOperation("op must be one of +, -, *, /, %, MOD")
def cmd_math ( ctx , op : str , left , right ) : type_fn = flt if isinstance ( left , int ) : type_fn = cint if isinstance ( right , int ) : type_fn = cint left = type_fn ( left ) right = type_fn ( right ) if op == "+" : return left + right elif op == "-" : return left - right elif op == "*" : return left * right elif op == "/" : return left / right elif op == "%" : return left * ( right / 100 ) elif op == "MOD" : return math . fmod ( left , right ) elif op == "WRAP" : return left % right raise InvalidOperation ( "op must be one of +, -, *, /, %, MOD" )
To perform math operations.
To perform math operations .
"""
			To perform math operations.

			Parameters:
			-----------
			op: Math operation to perform
			left: left value
			right: right value

			Returns:
			--------
			value of the left and right parameter with respect to the op.

	"""
ctx
op
str
left
right