RealDocs

UKismetMathLibrary::GetTAU

function Engine Blueprint Since 4.0
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Returns τ (tau), the full-circle constant equal to 2π (~6.28318). Useful when working with full rotations in radians without having to write 2.0 * PI everywhere.

Caveats & Gotchas

  • Less universally recognised than π — when working with teammates unfamiliar with τ, using 2.0 * GetPI() with an explanatory comment may be more maintainable.
  • Like GetPI, prefer the compile-time constant UE_TWO_PI in performance-critical C++ code instead of calling a function.

Signature

static UE_INL_API double GetTAU();

Return Type

double

Example

Wrap an angle to [0, 2π) C++
double AngleRad = FMath::Fmod(SomeAngle, UKismetMathLibrary::GetTAU());
if (AngleRad < 0.0) AngleRad += UKismetMathLibrary::GetTAU();

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.