#pragma once #include "CoreMinimal.h" /** * Unit conventions. The design is written in metres; Unreal works in centimetres (1 m = 100 uu). * Convert at the boundary and nowhere else: gameplay code that talks about metres calls these, * so a stray "* 100" never has to be audited. */ namespace Descent { constexpr double UUPerMetre = 100.0; FORCEINLINE double MetresToUU(double Metres) { return Metres * UUPerMetre; } FORCEINLINE double UUToMetres(double UU) { return UU / UUPerMetre; } FORCEINLINE FVector MetresToUU(const FVector& Metres) { return Metres * UUPerMetre; } FORCEINLINE FVector UUToMetres(const FVector& UU) { return UU / UUPerMetre; } }