Math Actions Plugin

Description

This plugin adds further functions to the Math object.

Actions

Math.Not(number Num);

Description:

Performs a inversion of all bits of the number passed as argument.

Num:

(number) A decimal number to invert.

Returns:

(number) The converted number. You can use Application.GetLastError to determine whether this action failed, and why.

Math.And(number Num1, number Num2);

Description:

Performs a bitwise AND operation of two decimal numbers.

Num1:

(number) The first operand.

Num2:

(number) The second operand.

Returns:

(number) The result of the bitwise operation. You can use Application.GetLastError to determine whether this action failed, and why.

Math.Or(number Num1, number Num2);

Description:

Performs a bitwise OR operation of two decimal numbers.

Num1:

(number) The first operand.

Num2:

(number) The second operand.

Returns:

(number) The result of the bitwise operation. You can use Application.GetLastError to determine whether this action failed, and why.

Math.Xor(number Num1, number Num2);

Description:

Performs a bitwise XOR (exclusive-or) operation of two decimal numbers.

Num1:

(number) The first operand.

Num2:

(number) The second operand.

Returns:

(number) The result of the bitwise operation. You can use Application.GetLastError to determine whether this action failed, and why.

Math.LShift(number Num, number Bits);

Description:

Performs a bitwise shift to the left of the decimal number. Shifting one bit to the left equals multiplying the number by two. The operation can cause overflows.

Num:

(number) The decimal number to be shifted left.

Bits:

(number) The optional number of bits to shift. The default is shifting one bit to the left.

Returns:

(number) The result of the bitwise operation. You can use Application.GetLastError to determine whether this action failed, and why.

Math.RShift(number Num, number Bits);

Description:

Performs a bitwise shift to the right of the decimal number. Shifting one bit to the right equals dividing the number by two, by cutting off the less significative bit.

Num:

(number) The decimal number to be shifted right.

Bits:

(number) The optional number of bits to shift. The default is shifting one bit to the right.

Returns:

(number) The result of the bitwise operation. You can use Application.GetLastError to determine whether this action failed, and why.

Math.NumberToHex(number DecValue);

Description:

Returns the equivalent hex value of a decimal value.

DecValue:

(number) The decimal value to be transformed into hexadecimal.

Returns:

(string) The hexadecimal value corresponding to the decimal. You can use Application.GetLastError to determine whether this action failed, and why.

Error Codes

12065 - Failed to start Math Actions plugin.

Change Log

1.0.0.0

 

Additional Information

Author:

Ulrich Peters
upeters@mindquake.com.br

Copyright:

Plugin is copyright © 2009 MindQuake Serviços de Informática Ltda.

Website:

http://www.mindquake.com.br


Copyright © 2009 MindQuake Serviços de Informática Ltda.
Todos os direitos reservados.