OROCHI
 
Loading...
Searching...
No Matches
GxMath Class Reference

算術演算クラス More...

#include <GxMath.h>

Inheritance diagram for GxMath:
Collaboration diagram for GxMath:

Static Public Member Functions

操作
template<class T >
static GX_FORCE_INLINE T getAbs (const T value)
 絶対値
 
template<class T >
static GX_FORCE_INLINE T getClamp (const T value, const T min, const T max)
 最小値・最大値で切り落とす
 
template<class T >
static GX_FORCE_INLINE T getMin (const T value0, const T value1)
 小さいほうを取得
 
template<class T >
static GX_FORCE_INLINE T getMax (const T value0, const T value1)
 大きいほうを取得
 
template<class T >
static GX_FORCE_INLINE T getLerp (const T value0, const T value1, f32 ratio)
 線形補間を取得
 
template<class T >
static GX_FORCE_INLINE void swap (T &a, T &b)
 2つの値をスワップ
 
static f32 getLoop (f32 value, f32 min, f32 max)
 余剰を計算して[min,max)の範囲に収める
 
static GX_FORCE_INLINE f32 getLoopPI (f32 value)
 余剰を計算して[-π,π)の範囲に収める
 
static GX_FORCE_INLINE f32 getLoopPI2 (f32 value)
 余剰を計算して[0,2π)の範囲に収める
 
static constexpr s32 getSign (s32 value)
 符号を取得
 
static constexpr f32 getSign (f32 value)
 符号を取得
 
static constexpr f32 getDegree (f32 radian)
 角度(度数法)を取得
 
static constexpr f64 getDegree (f64 radian)
 角度(度数法)を取得
 
static constexpr f32 getRadian (f32 degree)
 角度(弧度法)を取得
 
static constexpr f64 getRadian (f64 degree)
 角度(弧度法)を取得
 
static f32 getMinRadian (f32 radian)
 ラジアンの絶対値を最小にして取得
 
static GX_FORCE_INLINE f32 getSaturate (const f32 value)
 0.0f~1.0の範囲にクランプした値を取得(f32)
 
static GX_FORCE_INLINE f64 getSaturate (const f64 value)
 0.0f~1.0の範囲にクランプした値を取得(f64)
 
static GX_FORCE_INLINE f32 getSin (const f32 radian)
 正弦を取得(f32)
 
static GX_FORCE_INLINE f64 getSin (const f64 radian)
 正弦を取得(f64)
 
static GX_FORCE_INLINE f32 getFastSin (const f32 radian)
 正弦を取得(FPU, f32)
 
static GX_FORCE_INLINE f32 getCos (const f32 radian)
 余弦を取得(f32)
 
static GX_FORCE_INLINE f64 getCos (const f64 radian)
 余弦を取得(f64)
 
static GX_FORCE_INLINE f32 getFastCos (const f32 radian)
 余弦を取得(FPU, f32)
 
static GX_FORCE_INLINE f32 getTan (const f32 radian)
 正接を取得(f32)
 
static GX_FORCE_INLINE f64 getTan (const f64 radian)
 正接を取得(f64)
 
static GX_FORCE_INLINE f32 getFastTan (const f32 radian)
 正接を取得(FPU, f32)
 
static GX_FORCE_INLINE f32 getASin (const f32 value)
 逆正弦を取得(f32)
 
static GX_FORCE_INLINE f64 getASin (const f64 value)
 逆正弦を取得(f64)
 
static GX_FORCE_INLINE f32 getFastASin (const f32 value)
 逆正弦を取得(FPU, f32)
 
static GX_FORCE_INLINE f32 getACos (const f32 value)
 逆余弦を取得(f32)
 
static GX_FORCE_INLINE f64 getACos (const f64 value)
 逆余弦を取得(f64)
 
static GX_FORCE_INLINE f32 getFastACos (const f32 value)
 逆余弦を取得(FPU, f32)
 
static GX_FORCE_INLINE f32 getATan (const f32 value)
 逆正接を取得(f32)
 
static GX_FORCE_INLINE f64 getATan (const f64 value)
 逆正接を取得(f64)
 
static GX_FORCE_INLINE f32 getFastATan (const f32 value)
 逆正接を取得(FPU, f32)
 
static GX_FORCE_INLINE f32 getATan2 (const f32 valueY, const f32 valueX)
 逆正接を取得(f32)
 
static GX_FORCE_INLINE f64 getATan2 (const f64 valueY, const f64 valueX)
 逆正接を取得(f64)
 
static GX_FORCE_INLINE f32 getFastATan2 (const f32 valueY, const f32 valueX)
 逆正接を取得(FPU, f32)
 
static GX_FORCE_INLINE f32 getSqrtInverse (const f32 value)
 平方根の逆数を取得(f32)
 
static GX_FORCE_INLINE f64 getSqrtInverse (const f64 value)
 平方根の逆数を取得(f64)
 
static GX_FORCE_INLINE f32 getSqrt (const f32 value)
 平方根を取得(f32)
 
static GX_FORCE_INLINE f64 getSqrt (const f64 value)
 平方根を取得(f64)
 
static GX_FORCE_INLINE f32 getLog (const f32 value)
 対数を取得(f32)
 
static GX_FORCE_INLINE f64 getLog (const f64 value)
 対数を取得(f64)
 
static GX_FORCE_INLINE f32 getLog (const f32 value, const f32 base)
 対数を取得(f32)
 
static GX_FORCE_INLINE f64 getLog (const f64 value, const f64 base)
 対数を取得(f64)
 
static GX_FORCE_INLINE f32 getPow (const f32 value, const f32 n)
 n乗を取得(f32)
 
static GX_FORCE_INLINE f64 getPow (const f64 value, const f64 n)
 n乗を取得(f64)
 
static GX_FORCE_INLINE f32 getExp (const f32 n)
 自然対数のn乗を取得(f32)
 
static GX_FORCE_INLINE f64 getExp (const f64 n)
 自然対数のn乗を取得(f64)
 
static GX_FORCE_INLINE f32 getFastExp (const f32 n)
 自然対数のn乗を取得(FPU, f32)
 
static u32 getLog (u32 value, const u32 base=2)
 対数を取得
 
static u64 getPow (const u32 value, const u32 n)
 n乗を取得
 
static u32 getFigure (const s64 value)
 桁数を取得
 
static u32 getFigure (const u64 value)
 桁数を取得
 
static u32 getHash32 (void *pData, u32 size)
 ハッシュ値取得(32bit、データ、サイズ指定版)
 
static u32 getHash32 (GX_CSTR string)
 ハッシュ値取得(32bit、文字列指定版)
 
static u32 getHash32 (GX_CSTR string, u32 value)
 ハッシュ値取得(32bit、文字列、数値指定版)
 
static u32 getHash32Encrypt (GX_CSTR string)
 ハッシュ値取得(32bit、文字列指定、暗号化版)
 
static u32 getHash32 (GX_CWSTR string)
 ハッシュ値取得(32bit、ワイド文字列指定版)
 
static u32 getHash32 (GX_CWSTR string, u32 value)
 ハッシュ値取得(32bit、ワイド文字列、数値指定版)
 
static u32 getHash32Encrypt (GX_CWSTR string)
 ハッシュ値取得(32bit、ワイド文字列指定、暗号化版)
 
static u64 getHash64 (void *pData, u32 size)
 ハッシュ値取得(64bit、データ、サイズ指定版)
 
static u64 getHash64Fast (void *pData, u32 size)
 ハッシュ値取得(64bit、データ、サイズ指定、高速版)
 
static u64 getHash64 (GX_CSTR string)
 ハッシュ値取得(64bit、文字列指定版)
 
static u64 getHash64 (GX_CWSTR string)
 ハッシュ値取得(64bit、ワイド文字列指定版)
 
static u32 addHash32 (u32 hash, u32 value)
 既存の取得ハッシュに新たに値を加える(stringの後にs32を考慮したい場合などに使用)
 
template<class T >
static GX_FORCE_INLINE T getReverseEndian16 (T value)
 エンディアン変換した値を取得(16bit版)
 
template<class T >
static GX_FORCE_INLINE T getReverseEndian32 (T value)
 エンディアン変換した値を取得(32bit版)
 
template<class T >
static GX_FORCE_INLINE T getReverseEndian64 (T value)
 エンディアン変換した値を取得(64bit版)
 
template<class T >
static GX_FORCE_INLINE T getReverseEndian128 (T value)
 エンディアン変換した値を取得(128bit版)
 
static GX_FORCE_INLINE u32 getBitCount (u32 value)
 1の立っているビット数取得
 
template<class T >
static GX_FORCE_INLINE b32 isPowerOfTwo (T value)
 2のべき乗判定
 
template<class T >
static GX_FORCE_INLINE b32 isAlignment (T value, u32 alignment)
 アライメント判定
 
template<class T >
static GX_FORCE_INLINE b32 isAlignmentFast (T value, u32 alignment)
 アライメント判定(高速版 ※2のべき乗指定)
 
template<class T >
static GX_FORCE_INLINE T getRoundUp (T value, u32 alignment)
 数値切り上げ
 
template<class T >
static GX_FORCE_INLINE T getRoundDown (T value, u32 alignment)
 数値切り捨て
 
template<class T >
static GX_FORCE_INLINE T getRoundUpFast (T value, size_t alignment)
 数値切り上げ(高速版 ※2のべき乗指定)
 
template<class T >
static GX_FORCE_INLINE T getRoundDownFast (T value, u32 alignment)
 数値切り捨て(高速版 ※2のべき乗指定)
 
template<class T >
static GX_FORCE_INLINE T getRoundUpPowerOfTwo (T value)
 2のべき乗に切り上げ
 
static GX_FORCE_INLINE f32 getFloor (f32 value)
 GX用floor(f32用切捨て)
 
static GX_FORCE_INLINE f64 getFloor (f64 value)
 GX用floor(f64用切捨て)
 
static GX_FORCE_INLINE f32 getCeil (f32 value)
 GX用Ceil(f32用切上げ)
 
static GX_FORCE_INLINE f64 getCeil (f64 value)
 GX用Ceil(f64用切上げ)
 
static void calculateSplineTangent (const GxVector3 &position0, const GxVector3 &position1, const GxVector3 &position2, const f32 time, GxVector3 &direct)
 スプラインの接線方向を計算
 
static void calculateSplinePosition (const GxVector3 &position0, const GxVector3 &position1, const GxVector3 &position2, const f32 time, GxVector3 &position)
 スプラインの位置を計算
 
static void calculateBezierTangent (const GxVector3 &position0, const GxVector3 &position1, const GxVector3 &position2, const GxVector3 &position3, const f32 time, GxVector3 &direct)
 ベジェの接線方向を計算
 
static void calculateBezierPosition (const GxVector3 &position0, const GxVector3 &position1, const GxVector3 &position2, const GxVector3 &position3, const f32 time, GxVector3 &position)
 ベジエの位置を計算
 
template<class T >
static void geoCoordinatesToMeter (T longitude, T latitude, T centerLongitude, T centerLatitude, T &xMeter, T &zMeter)
 緯度経度からメートルに変換
 
static u32 getRandom (u32 value)
 値未満の乱数を取得
 
- Static Public Member Functions inherited from GxClassBaseRoot
static GX_FORCE_INLINE GxRtti__getStaticRtti (void)
 Rttiの取得
 

定義

enum class  PREFIX {
  NANO = -9 , MICRO = -6 , MILLI = -3 , ZERO = 0 ,
  KILO = 3 , MEGA = 6 , GIGA = 9
}
 単位接頭辞の定義 More...
 
static constexpr u32 NANO_INVERSE = 1000000000
 ナノの逆数
 
static constexpr u32 MICRO_INVERSE = 1000000
 マイクロの逆数
 
static constexpr u32 MILLI_INVERSE = 1000
 ミリの逆数
 
static constexpr u32 KILO_VALUE = 1000
 キロの値
 
static constexpr u32 MEGA_VALUE = 1000000
 メガの値
 
static constexpr u32 GIGA_VALUE = 1000000000
 ギガの値
 
static constexpr u32 VALUE_1 = 0x00000001
 1
 
static constexpr u32 VALUE_2 = 0x00000002
 2
 
static constexpr u32 VALUE_4 = 0x00000004
 4
 
static constexpr u32 VALUE_8 = 0x00000008
 8
 
static constexpr u32 VALUE_16 = 0x00000010
 16
 
static constexpr u32 VALUE_32 = 0x00000020
 32
 
static constexpr u32 VALUE_64 = 0x00000040
 64
 
static constexpr u32 VALUE_128 = 0x00000080
 128
 
static constexpr u32 VALUE_256 = 0x00000100
 256
 
static constexpr u32 VALUE_512 = 0x00000200
 512
 
static constexpr u32 VALUE_1K = 0x00000400
 1K
 
static constexpr u32 VALUE_2K = 0x00000800
 2K
 
static constexpr u32 VALUE_4K = 0x00001000
 4K
 
static constexpr u32 VALUE_8K = 0x00002000
 8K
 
static constexpr u32 VALUE_16K = 0x00004000
 16K
 
static constexpr u32 VALUE_32K = 0x00008000
 32K
 
static constexpr u32 VALUE_64K = 0x00010000
 64K
 
static constexpr u32 VALUE_128K = 0x00020000
 128K
 
static constexpr u32 VALUE_256K = 0x00040000
 256K
 
static constexpr u32 VALUE_512K = 0x00080000
 512K
 
static constexpr u32 VALUE_1M = 0x00100000
 1M
 
static constexpr u32 VALUE_2M = 0x00200000
 2M
 
static constexpr u32 VALUE_4M = 0x00400000
 4M
 
static constexpr u32 VALUE_8M = 0x00800000
 8M
 
static constexpr u32 VALUE_16M = 0x01000000
 16M
 
static constexpr u32 VALUE_32M = 0x02000000
 32M
 
static constexpr u32 VALUE_64M = 0x04000000
 64M
 
static constexpr u32 VALUE_128M = 0x08000000
 128M
 
static constexpr u32 VALUE_256M = 0x10000000
 256M
 
static constexpr u32 VALUE_512M = 0x20000000
 512M
 
static constexpr u32 VALUE_1G = 0x40000000
 1G
 
static constexpr u32 VALUE_2G = 0x80000000
 2G
 

Additional Inherited Members

- Public Member Functions inherited from GxClassBase
constexpr GxClassBase (void)
 コンストラクタ
 
constexpr GxClassBase (const GxClassBase &base)
 コピーコンストラクタ
 
 ~GxClassBase (void) override
 デストラクタ
 
- Public Member Functions inherited from GxClassBaseRoot
constexpr GxClassBaseRoot (void)
 コンストラクタ
 
constexpr GxClassBaseRoot (const GxClassBaseRoot &)
 コピーコンストラクタ
 
virtual ~GxClassBaseRoot (void)
 デストラクタ
 
constexpr GxClassBaseRootoperator= (const GxClassBaseRoot &)
 代入演算子
 
virtual GxRttigetRtti (void) const =0
 Rttiの取得
 
virtual GX_FORCE_INLINE const GxTypedObjectgetDefaultObject (void)
 デフォルトオブジェクトを取得
 
GX_FORCE_INLINE b32 isDefaultObject (void)
 デフォルトオブジェクト判定
 

Detailed Description

算術演算クラス

Member Enumeration Documentation

◆ PREFIX

enum class GxMath::PREFIX
strong

単位接頭辞の定義

Enumerator
NANO 

ナノ

MICRO 

マイクロ

MILLI 

ミリ

ZERO 

ゼロ

KILO 

キロ

MEGA 

メガ

GIGA 

ギガ

Member Function Documentation

◆ addHash32()

u32 GxMath::addHash32 ( u32 hash,
u32 value )
static

既存の取得ハッシュに新たに値を加える(stringの後にs32を考慮したい場合などに使用)

Parameters
hash[in] ベースのハッシュ値
value[in] 加える値
Returns
ハッシュ値

◆ calculateBezierPosition()

void GxMath::calculateBezierPosition ( const GxVector3 & position0,
const GxVector3 & position1,
const GxVector3 & position2,
const GxVector3 & position3,
const f32 time,
GxVector3 & position )
static

ベジエの位置を計算

Parameters
position0[in] 始点
position1[in] 制御点1
position2[in] 制御点2
position3[in] 終点
time[in] タイムライン(0.0~1.0)
position[out] 取得位置
Here is the caller graph for this function:

◆ calculateBezierTangent()

void GxMath::calculateBezierTangent ( const GxVector3 & position0,
const GxVector3 & position1,
const GxVector3 & position2,
const GxVector3 & position3,
const f32 time,
GxVector3 & direct )
static

ベジェの接線方向を計算

Parameters
position0[in] 始点
position1[in] 制御点1
position2[in] 制御点2
position3[in] 終点
time[in] タイムライン(0.0~1.0)
direct[in] 取得方向
Here is the call graph for this function:

◆ calculateSplinePosition()

void GxMath::calculateSplinePosition ( const GxVector3 & position0,
const GxVector3 & position1,
const GxVector3 & position2,
const f32 time,
GxVector3 & position )
static

スプラインの位置を計算

Parameters
position0[in] 始点
position1[in] 制御点
position2[in] 終点
time[in] タイムライン(0.0~1.0)
position[in] 取得位置

◆ calculateSplineTangent()

void GxMath::calculateSplineTangent ( const GxVector3 & position0,
const GxVector3 & position1,
const GxVector3 & position2,
const f32 time,
GxVector3 & direct )
static

スプラインの接線方向を計算

Parameters
position0[in] 始点
position1[in] 制御点
position2[in] 終点
time[in] タイムライン(0.0~1.0)
direct[in] 取得方向
Here is the call graph for this function:

◆ geoCoordinatesToMeter()

template<class T >
void GxMath::geoCoordinatesToMeter ( T longitude,
T latitude,
T centerLongitude,
T centerLatitude,
T & xMeter,
T & zMeter )
static

緯度経度からメートルに変換

Parameters
longitude[in] 経度
latitude[in] 緯度
centerLongitude[in] 中心の経度
centerLatitude[in] 中心の緯度
xMeter[out] x座標[m]
zMeter[out] z座標[m]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBitCount()

GX_FORCE_INLINE u32 GxMath::getBitCount ( u32 value)
static

1の立っているビット数取得

Parameters
value[in] 判定数値
Returns
1の立っているビット数
Here is the caller graph for this function:

◆ getFigure() [1/2]

u32 GxMath::getFigure ( const s64 value)
static

桁数を取得

Parameters
value[in] 値
Returns
桁数
Here is the caller graph for this function:

◆ getFigure() [2/2]

u32 GxMath::getFigure ( const u64 value)
static

桁数を取得

Parameters
value[in] 値
Returns
桁数

◆ getHash32() [1/5]

u32 GxMath::getHash32 ( GX_CSTR string)
static

ハッシュ値取得(32bit、文字列指定版)

Parameters
string[in] 文字列
Returns
ハッシュ値
Here is the call graph for this function:

◆ getHash32() [2/5]

u32 GxMath::getHash32 ( GX_CSTR string,
u32 value )
static

ハッシュ値取得(32bit、文字列、数値指定版)

Parameters
string[in] 文字列
value[in] 指定数値
Returns
ハッシュ値
Here is the call graph for this function:

◆ getHash32() [3/5]

u32 GxMath::getHash32 ( GX_CWSTR string)
static

ハッシュ値取得(32bit、ワイド文字列指定版)

Parameters
string[in] ワイド文字列
Returns
ハッシュ値
Here is the call graph for this function:

◆ getHash32() [4/5]

u32 GxMath::getHash32 ( GX_CWSTR string,
u32 value )
static

ハッシュ値取得(32bit、ワイド文字列、数値指定版)

Parameters
string[in] ワイド文字列
value[in] 指定数値
Returns
ハッシュ値
Here is the call graph for this function:

◆ getHash32() [5/5]

u32 GxMath::getHash32 ( void * pData,
u32 size )
static

ハッシュ値取得(32bit、データ、サイズ指定版)

Parameters
pData[in] データ
size[in] サイズ
Returns
ハッシュ値
Here is the caller graph for this function:

◆ getHash32Encrypt() [1/2]

u32 GxMath::getHash32Encrypt ( GX_CSTR string)
static

ハッシュ値取得(32bit、文字列指定、暗号化版)

Parameters
string[in] 文字列
Returns
ハッシュ値
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHash32Encrypt() [2/2]

u32 GxMath::getHash32Encrypt ( GX_CWSTR string)
static

ハッシュ値取得(32bit、ワイド文字列指定、暗号化版)

Parameters
string[in] ワイド文字列
Returns
ハッシュ値
Here is the call graph for this function:

◆ getHash64() [1/3]

u64 GxMath::getHash64 ( GX_CSTR string)
static

ハッシュ値取得(64bit、文字列指定版)

Parameters
string[in] 文字列
Returns
ハッシュ値
Here is the call graph for this function:

◆ getHash64() [2/3]

u64 GxMath::getHash64 ( GX_CWSTR string)
static

ハッシュ値取得(64bit、ワイド文字列指定版)

Parameters
string[in] ワイド文字列
Returns
ハッシュ値
Here is the call graph for this function:

◆ getHash64() [3/3]

u64 GxMath::getHash64 ( void * pData,
u32 size )
static

ハッシュ値取得(64bit、データ、サイズ指定版)

Parameters
pData[in] データ
size[in] サイズ
Returns
ハッシュ値
Here is the caller graph for this function:

◆ getHash64Fast()

u64 GxMath::getHash64Fast ( void * pData,
u32 size )
static

ハッシュ値取得(64bit、データ、サイズ指定、高速版)

Parameters
pData[in] データ
size[in] サイズ
Returns
ハッシュ値

◆ getLog()

u32 GxMath::getLog ( u32 value,
const u32 base = 2 )
static

対数を取得

Parameters
value[in] 値
base[in] 底
Returns
対数値

◆ getLoop()

f32 GxMath::getLoop ( f32 value,
f32 min,
f32 max )
static

余剰を計算して[min,max)の範囲に収める

Parameters
value[in] 収める値
min[in] 最小値
max[in] 最大値
Returns
変更後の値
Here is the caller graph for this function:

◆ getMinRadian()

f32 GxMath::getMinRadian ( f32 radian)
static

ラジアンの絶対値を最小にして取得

Parameters
radian[in] 変更する値
Returns
変更後の値

◆ getPow()

u64 GxMath::getPow ( const u32 value,
const u32 n )
static

n乗を取得

Parameters
value[in] 値
n[in] 乗数
Returns
取得値

◆ getRandom()

u32 GxMath::getRandom ( u32 value)
static

値未満の乱数を取得

Parameters
value[in] 値
Returns
乱数
Here is the call graph for this function:

◆ getReverseEndian128()

template<class T >
GX_FORCE_INLINE T GxMath::getReverseEndian128 ( T value)
static

エンディアン変換した値を取得(128bit版)

Parameters
value元の値
Returns
変換した値
Here is the caller graph for this function:

◆ getReverseEndian16()

template<class T >
GX_FORCE_INLINE T GxMath::getReverseEndian16 ( T value)
static

エンディアン変換した値を取得(16bit版)

Parameters
value元の値
Returns
変換した値
Here is the caller graph for this function:

◆ getReverseEndian32()

template<class T >
GX_FORCE_INLINE T GxMath::getReverseEndian32 ( T value)
static

エンディアン変換した値を取得(32bit版)

Parameters
value元の値
Returns
変換した値
Here is the caller graph for this function:

◆ getReverseEndian64()

template<class T >
GX_FORCE_INLINE T GxMath::getReverseEndian64 ( T value)
static

エンディアン変換した値を取得(64bit版)

Parameters
value元の値
Returns
変換した値
Here is the caller graph for this function:

◆ getRoundDown()

template<class T >
GX_FORCE_INLINE T GxMath::getRoundDown ( T value,
u32 alignment )
static

数値切り捨て

Parameters
value[in] 入力数値
alignment[in] 調整アライメント
Returns
アライメント補正後数値 (切り捨て処理)

◆ getRoundDownFast()

template<class T >
GX_FORCE_INLINE T GxMath::getRoundDownFast ( T value,
u32 alignment )
static

数値切り捨て(高速版 ※2のべき乗指定)

Parameters
value[in] 入力数値
alignment[in] 調整アライメント (2のべき乗)
Returns
アライメント補正後数値 (切り捨て処理)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRoundUp()

template<class T >
GX_FORCE_INLINE T GxMath::getRoundUp ( T value,
u32 alignment )
static

数値切り上げ

Parameters
value[in] 入力数値
alignment[in] 調整アライメント
Returns
アライメント補正後数値 (切り上げ処理)
Here is the caller graph for this function:

◆ getRoundUpFast()

template<class T >
GX_FORCE_INLINE T GxMath::getRoundUpFast ( T value,
size_t alignment )
static

数値切り上げ(高速版 ※2のべき乗指定)

Parameters
value[in] 入力数値
alignment[in] 調整アライメント (2のべき乗)
Returns
アライメント補正後数値 (切り上げ処理)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRoundUpPowerOfTwo()

template<class T >
GX_FORCE_INLINE T GxMath::getRoundUpPowerOfTwo ( T value)
static

2のべき乗に切り上げ

Parameters
value[in] 入力数値
Returns
補正後数値 (切り上げ処理)
Here is the caller graph for this function:

◆ getSaturate() [1/2]

GX_FORCE_INLINE f32 GxMath::getSaturate ( const f32 value)
static

0.0f~1.0の範囲にクランプした値を取得(f32)

Parameters
value元の値
Returns
クランプした値
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSaturate() [2/2]

GX_FORCE_INLINE f64 GxMath::getSaturate ( const f64 value)
static

0.0f~1.0の範囲にクランプした値を取得(f64)

Parameters
value元の値
Returns
クランプした値
Here is the call graph for this function:

◆ isAlignment()

template<class T >
GX_FORCE_INLINE b32 GxMath::isAlignment ( T value,
u32 alignment )
static

アライメント判定

Parameters
value[in] 判定数値
alignment[in] 判定アライメント
Returns
アライメント整っているならtrue
Here is the caller graph for this function:

◆ isAlignmentFast()

template<class T >
GX_FORCE_INLINE b32 GxMath::isAlignmentFast ( T value,
u32 alignment )
static

アライメント判定(高速版 ※2のべき乗指定)

Parameters
value[in] 判定数値
alignment[in] 判定アライメント (2のべき乗)
Returns
アライメント整っているならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isPowerOfTwo()

template<class T >
GX_FORCE_INLINE b32 GxMath::isPowerOfTwo ( T value)
static

2のべき乗判定

Returns
2のべき乗ならtrue
Here is the caller graph for this function:

The documentation for this class was generated from the following files: