UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
radmath.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
#ifndef __RADMATHH__
3
#define __RADMATHH__
4
5
#include <math.h>
6
7
RADDEFSTART
8
9
#define mult64anddiv( a, b, c ) ( (U32) ( ( ( (U64) a ) * ( (U64) b ) ) / ( (U64) c ) ) )
10
#define mult64andshift( a, b, c ) ( (U32) ( ( ( (U64) a ) * ( (U64) b ) ) >> ( (U64) c ) ) )
11
#define radabs abs
12
13
// We use the floating point version of everything and have casts around everything
14
// to ensure we don't accidentally have an expression evaluate as double on one platform
15
// and float on the other.
16
//
17
// This was due to previously using e.g. sqrt on one platform and sqrtf on another, but there's
18
// no reason to _not_ have these casts.
19
#define radatan2( val1, val2 ) ((float)atan2f ( (float)val1, (float)val2) )
20
#define radpow( val1, val2 ) ((float)powf ( (float)val1, (float)val2) )
21
#define radfsqrt( val ) ((float)sqrtf ( (float)val) )
22
#define radlog10( val ) ((float)log10f ( (float)val) )
23
#define radexp( val ) ((float)expf ( (float)val) )
24
#define radfabs( val ) ((float)fabsf ( (float)val) )
25
#define radfloor( val ) ((float)floorf ( (float)val) )
26
27
float
ranged_log_0p05_to_0p5
(
float
x);
28
29
#if !defined( _MSC_VER )
30
#include <stdlib.h>
// abs
31
#endif
32
33
RADDEFEND
34
35
#endif
RADDEFEND
#define RADDEFEND
Definition
egttypes.h:68
RADDEFSTART
#define RADDEFSTART
Definition
egttypes.h:67
ranged_log_0p05_to_0p5
float ranged_log_0p05_to_0p5(float x)
Definition
ranged_log.cpp:8
Engine
Source
Runtime
BinkAudioDecoder
SDK
BinkAudio
Src
radmath.h
Generated by
1.9.8