Path: blob/master/thirdparty/jolt_physics/Jolt/Math/Real.h
9913 views
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)1// SPDX-FileCopyrightText: 2022 Jorrit Rouwe2// SPDX-License-Identifier: MIT34#pragma once56#include <Jolt/Math/DVec3.h>7#include <Jolt/Math/DMat44.h>89JPH_NAMESPACE_BEGIN1011#ifdef JPH_DOUBLE_PRECISION1213// Define real to double14using Real = double;15using Real3 = Double3;16using RVec3 = DVec3;17using RVec3Arg = DVec3Arg;18using RMat44 = DMat44;19using RMat44Arg = DMat44Arg;2021#define JPH_RVECTOR_ALIGNMENT JPH_DVECTOR_ALIGNMENT2223#else2425// Define real to float26using Real = float;27using Real3 = Float3;28using RVec3 = Vec3;29using RVec3Arg = Vec3Arg;30using RMat44 = Mat44;31using RMat44Arg = Mat44Arg;3233#define JPH_RVECTOR_ALIGNMENT JPH_VECTOR_ALIGNMENT3435#endif // JPH_DOUBLE_PRECISION3637// Put the 'real' operator in a namespace so that users can opt in to use it:38// using namespace JPH::literals;39namespace literals {40constexpr Real operator ""_r (long double inValue) { return Real(inValue); }41};4243JPH_NAMESPACE_END444546