{ }Blueprint → C++

Unreal Engine 5 · Blueprint → C++

Sin / Cos (Degrees) in Unreal Engine 5 C++UE Docs

The degree-based Sin and Cos Blueprint nodes map to FMath::Sin(FMath::DegreesToRadians(Degrees)) in Unreal Engine 5 C++, or the helper UKismetMathLibrary::DegSin(Degrees).

Blueprint node & C++ equivalent

C++
float S = FMath::Sin(FMath::DegreesToRadians(Degrees));
// Kismet helpers also exist: UKismetMathLibrary::DegSin(Degrees)

What do the degree Sin and Cos nodes do?

These nodes compute sine and cosine from an angle expressed in degrees rather than radians. They are convenient when your data, such as a rotation or designer-facing parameter, is already stored in degrees.

Internally they convert the degree value to radians before evaluating the trig function.

The C++ equivalent

Wrap the angle with FMath::DegreesToRadians(Degrees) and pass it to FMath::Sin or FMath::Cos. This is the explicit form and makes the radian conversion obvious in code.

Alternatively, call UKismetMathLibrary::DegSin(Degrees) or DegCos(Degrees), which perform the conversion for you and match the Blueprint nodes one-to-one. Include Kismet/KismetMathLibrary.h to use them.

Common mistakes

The most frequent bug is feeding a degree value straight into FMath::Sin, which silently treats it as radians and produces wrong results. Always convert with DegreesToRadians or use the DegSin and DegCos helpers when your angle is in degrees.

Frequently asked questions

How do you compute sine of a degree angle in UE5 C++?+

Use FMath::Sin(FMath::DegreesToRadians(Degrees)), or the convenience helper UKismetMathLibrary::DegSin(Degrees) from KismetMathLibrary.h.

What is the difference between FMath::Sin and DegSin?+

FMath::Sin expects radians, while UKismetMathLibrary::DegSin expects degrees and converts internally. DegSin is equivalent to FMath::Sin(DegreesToRadians(x)).

Related Math nodes

View all Math nodes →