Namespace LrMath

This namespace provides additional basic math operations not otherwise available in the Lua language.

Access the functions directly from the imported namespace.

Summary

LrMath.bitAnd( a, b )
Performs a bitwise AND on two integers.
LrMath.bitOr( a, b )
Performs a bitwise OR on two integers.
LrMath.bitXor( a, b )
Performs a bitwise exclusive OR on two integers.

Functions

LrMath.bitAnd( a, b )
Performs a bitwise AND on two integers.

First supported in version 3.0 of the Lightroom SDK.

The values a and b must be numeric and are treated as positive 32-bit integers. The function's behavior when passed non-integer numbers or numbers that fall outside the 32-bit space is undefined.

Parameters

1. a
(number) The first operand.
2. b
(number) The second operand.

Return value

(number) The result of a bitwise AND operation.
LrMath.bitOr( a, b )
Performs a bitwise OR on two integers.

First supported in version 3.0 of the Lightroom SDK.

The values a and b must be numeric and are treated as positive 32-bit integers. The function's behavior when passed non-integer numbers or numbers that fall outside the 32-bit space is undefined.

Parameters

1. a
(number) The first operand.
2. b
(number) The second operand.

Return value

(number) The result of a bitwise OR operation.
LrMath.bitXor( a, b )
Performs a bitwise exclusive OR on two integers.

First supported in version 3.0 of the Lightroom SDK.

The values a and b must be numeric and are treated as positive 32-bit integers. The function's behavior when passed non-integer numbers or numbers that fall outside the 32-bit space is undefined.

Parameters

1. a
(number) The first operand.
2. b
(number) The second operand.

Return value

(number) The result of a bitwise XOR operation.