pow
Returns the specified value raised to the specified power.
ret pow(x, y) |
---|
Parameters
Item | Description |
---|---|
x |
[in] The specified value. |
y |
[in] The specified power. |
Return Value
The x parameter raised to the power of the y parameter.
Remarks
The pow HLSL intrinsic function calculates xy.
X | Y | Result |
---|---|---|
< 0 | any | NAN |
> 0 | == 0 | 1 |
== 0 | > 0 | 0 |
== 0 | < 0 | inf |
> 0 | < 0 | 1/X-Y |
== 0 | == 0 | Depends on the particular graphics processor 0, or 1, or NAN |
Type Description
Name | Template Type | Component Type | Size |
---|---|---|---|
x | scalar, vector, or matrix | float | any |
y | same as input x | float | same dimension(s) as input x |
ret | same as input x | float | same dimension(s) as input x |
Minimum Shader Model
This function is supported in the following shader models.
Shader Model | Supported |
---|---|
Shader Model 2 (DirectX HLSL) and higher shader models | yes |
Shader Model 1 (DirectX HLSL) | yes (vs_1_1 only) |