UKismetMathLibrary::MultiplyByPi
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPureUFUNCTION
Description
Multiplies the input by pi (approximately 3.14159265). Primarily useful in Blueprint where exposing UE_PI as a constant node is less ergonomic than a dedicated multiply node.
Caveats & Gotchas
- • In C++ it is clearer and equally fast to write Value * UE_PI directly. This function exists mainly as a Blueprint-friendly node; calling it in C++ adds no benefit.
- • Uses the double-precision UE_PI constant, so results are accurate to ~15 significant figures. The result is a double — assigning to float will silently narrow precision.
Signature
static UE_INL_API double MultiplyByPi(double Value); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Value | double | The value to multiply by pi. | — |
Return Type
double Example
Convert a half-turn count to radians C++
double HalfTurns = 2.5;
double Radians = UKismetMathLibrary::MultiplyByPi(HalfTurns); // returns ~7.854 Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?