CImage:Pow CImage:Powab

CImage:Powa


The Powa method raises a number to powers specified by the image pixels.

Syntax

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.

Remarks

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.

Example

Suppose an image is displayed in a CImageView named V. The following script fragment raises 1.5 to powers specified by the image pixels:

 

I = V:GetImage()

-- attach the current displayed image

I:Powa( 1.5 )

-- perform the operation

V:Update()

-- update the display after the shift

Related Topics

CImage , Pow, Powab, Sqrt