UKismetMathLibrary::Multiply_RotatorInt
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns a new rotator with each component of A multiplied by the integer B. Functionally identical to Multiply_RotatorFloat but accepts an integer multiplier.
Caveats & Gotchas
- • B is widened to float internally, so there is no integer overflow risk, but values above ~16 million will lose precision due to float representation.
- • Prefer Multiply_RotatorFloat over this function unless the caller naturally has an int32 — the float version avoids the implicit int-to-float conversion and is clearer about intent.
Signature
static UE_INL_API FRotator Multiply_RotatorInt(FRotator A, int32 B); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | FRotator | The rotator to scale. | — |
| B | int32 | Integer scale factor applied to all three components. | — |
Return Type
FRotator Example
Triple a base rotation step C++
FRotator Step(0.f, 30.f, 0.f);
FRotator TripleStep = UKismetMathLibrary::Multiply_RotatorInt(Step, 3);
// TripleStep == FRotator(0, 90, 0) Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?