UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Complex.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4// HEADER_UNIT_SKIP - Internal
5
6namespace Chaos
7{
9{
10 public:
13 : MReal(Real), MImaginary(Imaginary) {}
14 FComplex Conjugated() { return FComplex(MReal, -MImaginary); }
15 FComplex operator*(const FReal Other) const { return FComplex(MReal * Other, MImaginary * Other); }
16 FComplex operator+(const FComplex Other) const { return FComplex(MReal + Other.MReal, MImaginary + Other.MImaginary); }
18 {
19 MReal -= Other.MReal;
20 MImaginary -= Other.MImaginary;
21 return *this;
22 }
23 inline void MakeReal() { MImaginary = 0; }
24 inline const FReal Real() const { return MReal; }
25 inline const FReal Imaginary() const { return MImaginary; }
26
27 private:
28 FReal MReal;
29 FReal MImaginary;
30};
31
32FComplex operator*(const FReal Other, const FComplex Complex)
33{
34 return Complex * Other;
35}
36
37template<class T>
38using Complex UE_DEPRECATED(4.27, "Deprecated. this class is to be deleted, use FComplex instead") = FComplex;
39}
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
Definition Complex.h:9
void MakeReal()
Definition Complex.h:23
FComplex(const FReal Real, const FReal Imaginary)
Definition Complex.h:12
FComplex Conjugated()
Definition Complex.h:14
const FReal Real() const
Definition Complex.h:24
FComplex()
Definition Complex.h:11
FComplex operator+(const FComplex Other) const
Definition Complex.h:16
const FReal Imaginary() const
Definition Complex.h:25
FComplex & operator-=(const FComplex Other)
Definition Complex.h:17
FComplex operator*(const FReal Other) const
Definition Complex.h:15
Definition SkeletalMeshComponent.h:307
FRealDouble FReal
Definition Real.h:22
FComplex operator*(const FReal Other, const FComplex Complex)
Definition Complex.h:32