DirectX
There were no DXIL opcodes found for degrees.
SPIR-V
Degrees:
Description:
Degrees
Converts radians to degrees, i.e., radians * 180 / π.
The operand radians must be a scalar or vector whose component type is
16-bit or 32-bit floating-point.
Result Type and the type of radians must be the same type. Results
are computed per component.
| Number |
Operand 1 |
Operand 2 |
Operand 3 |
Operand 4 |
12 |
<id>
radians |
|
|
|
Test Case(s)
Example 1
//dxc degrees_test.hlsl -T lib_6_8 -enable-16bit-types -O0
export float4 fn(float4 p1) {
return degrees(p1);
}
HLSL:
Converts the specified value from radians to degrees.
Parameters
| Item |
Description |
x
|
[in] The specified value.
|
Return Value
The result of converting the x parameter from radians to degrees.
Type Description
Minimum Shader Model
This function is supported in the following shader models.
See also
-
Intrinsic Functions (DirectX HLSL)
degreesclang builtin,degreesclang builtin withhlsl_intrinsics.hdegreestoCheckHLSLBuiltinFunctionCallinSemaChecking.cppdegreestoEmitHLSLBuiltinExprinCGBuiltin.cppclang/test/CodeGenHLSL/builtins/degrees.hlslclang/test/SemaHLSL/BuiltIns/degrees-errors.hlslint_spv_degreesintrinsic inIntrinsicsSPIRV.tddegreeslowering and map it toint_spv_degreesinSPIRVInstructionSelector::selectIntrinsic.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/degrees.llDirectX
There were no DXIL opcodes found for
degrees.SPIR-V
Degrees:
Description:
Degrees
Converts radians to degrees, i.e., radians * 180 / π.
The operand radians must be a scalar or vector whose component type is
16-bit or 32-bit floating-point.
Result Type and the type of radians must be the same type. Results
are computed per component.
12
<id>
radians
Test Case(s)
Example 1
HLSL:
Converts the specified value from radians to degrees.
Parameters
Return Value
The result of converting the x parameter from radians to degrees.
Type Description
Minimum Shader Model
This function is supported in the following shader models.
See also
Intrinsic Functions (DirectX HLSL)