RealDocs

UKismetMathLibrary::Conv_DoubleToVector2D

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

Description

Broadcasts a single double to both components of an FVector2D, producing (InDouble, InDouble). Handy for uniform 2D scale or padding values.

Caveats & Gotchas

  • Both X and Y are set identically — broadcast, not axis-selective. Use FVector2D(Value, 0) or FVector2D(0, Value) when you need a single-axis 2D vector.
  • Blueprint DisplayName is 'To Vector2D', without a type qualifier, which can make it easy to miss in the node picker. The full qualified name is Conv_DoubleToVector2D.

Signature

static UE_INL_API FVector2D Conv_DoubleToVector2D(double InDouble)

Parameters

Name Type Description Default
InDouble double The scalar value to broadcast to both 2D vector components.

Return Type

FVector2D

Example

Set uniform padding in a UMG widget C++
double Padding = 8.0;
FVector2D UniformPadding = UKismetMathLibrary::Conv_DoubleToVector2D(Padding);
// Use as slot padding: FMargin(Padding) is preferred but Conv works for FVector2D APIs

Version History

Introduced in: 5.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.