CImage:Powa
The Powa method raises a number to powers specified by the image pixels.
bResult = CImage:Pow( power )
power specifies the exponent and may be a number or string.
On success, this method returns true.
On failure, this method returns false.
This method has a possibility of an illegal operation if a negative number is raised to a non-integral power. Mira traps this condition and substitutes a replacement value into the output pixel. The replacement value is set for math operations using the SetMathErrVal method.
Suppose an image is displayed in a CImageView named V. The following script raises 1.5 to powers specified by the image pixels:
|
-- attach the current displayed image |
|
-- perform the operation |
|
-- update the display after the shift |
CImage class, Pow, Powab, Sqrt
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.