一般的な数学関数と定数をまとめたモジュールです。
More...
#include <Math.hpp>
|
static constexpr float | degreesToRadians (float d) noexcept |
| 度をラジアンに変換します。
|
|
static constexpr float | radiansToDegrees (float r) noexcept |
| ラジアンを度に変換します。
|
|
static constexpr float | clamp (float value, float minValue, float maxValue) noexcept |
| 値を指定された範囲内に制限します。
|
|
static constexpr float | clamp01 (float value) noexcept |
| 値を0.0~1.0の範囲内に制限します。
|
|
static unsigned int | nextPow2 (unsigned int value) |
| 指定値以上の最小の 2 のべき乗数を返します。
|
|
static void | sinCos (float value, float *outSin, float *outCos) |
| sin と cos を計算します。
|
|
static bool | nearEqual (float value1, float value2) |
| 誤差を考慮し、浮動小数点の比較を行います。
|
|
static bool | isNaN (float value) |
| 値が NaN(非数) かを判定します。
|
|
static bool | isNaN (double value) |
| 値が NaN(非数) かを判定します。
|
|
static bool | isInf (float value) |
| 値が無限大かを判定します。
|
|
static bool | isInf (double value) |
| 値が無限大かを判定します。
|
|
static bool | isNaNOrInf (float value) |
| 値が NaN(非数) または 無限大 かを判定します。
|
|
static bool | isNaNOrInf (double value) |
| 値が NaN(非数) または 無限大 かを判定します。
|
|
static constexpr float | quadAccel (float p, float v, float a, float t) noexcept |
| 等加速度運動の式で補間した値を計算します。 More...
|
|
static constexpr float | lerp (float v1, float v2, float t) noexcept |
| 2つの値の間を線形補間します。 More...
|
|
static constexpr float | hermite (float v1, float a1, float v2, float a2, float t) noexcept |
| エルミートスプライン補間を実行します。 More...
|
|
static constexpr float | catmullRom (float v1, float v2, float v3, float v4, float t) noexcept |
| Catmull-Rom 補間を実行します。 More...
|
|
static constexpr float | cubicBezier (float v1, float v2, float v3, float v4, float t) noexcept |
| 3次ベジェ 補間を実行します。 More...
|
|
|
static const float | NaN |
| NaN (Not-a-Number: 非数)
|
|
static const float | Inf |
| positive infinity
|
|
static const float | PI |
| 円周率 (3.14159265...)
|
|
static const float | PI2 |
| 円周率 * 2 (3.14159265...)
|
|
static const float | PIDiv2 |
| 円周率 / 2
|
|
◆ catmullRom()
constexpr float ln::Math::catmullRom |
( |
float |
v1, |
|
|
float |
v2, |
|
|
float |
v3, |
|
|
float |
v4, |
|
|
float |
t |
|
) |
| |
|
staticnoexcept |
Catmull-Rom 補間を実行します。
- Parameters
-
[in] | v1 | : 1番目の位置 |
[in] | v2 | : 2番目の位置 (t = 0.0 のときの値) |
[in] | v3 | : 3番目の位置 (t = 1.0 のときの値) |
[in] | v4 | : 4番目の位置 |
[in] | t | : 加重係数 |
- Returns
- 補間結果の値 t は通常、0.0~1.0 を指定します。
◆ cubicBezier()
constexpr float ln::Math::cubicBezier |
( |
float |
v1, |
|
|
float |
v2, |
|
|
float |
v3, |
|
|
float |
v4, |
|
|
float |
t |
|
) |
| |
|
staticnoexcept |
3次ベジェ 補間を実行します。
- Parameters
-
[in] | v1 | : 始点 |
[in] | v2 | : 1番目の制御点 |
[in] | v3 | : 2番目の制御点 |
[in] | v4 | : 終点 |
[in] | t | : 加重係数 |
- Returns
- 補間結果の値 t は通常、0.0~1.0 を指定します。
◆ hermite()
constexpr float ln::Math::hermite |
( |
float |
v1, |
|
|
float |
a1, |
|
|
float |
v2, |
|
|
float |
a2, |
|
|
float |
t |
|
) |
| |
|
staticnoexcept |
エルミートスプライン補間を実行します。
- Parameters
-
[in] | v1 | : 開始値 |
[in] | a1 | : 開始値の接線の傾き(速度) |
[in] | v2 | : 終了値 |
[in] | a2 | : 終了値の接線の傾き(速度) |
[in] | t | : 加重係数 |
- Returns
- 補間結果の値 t は通常、0.0~1.0 を指定します。
◆ lerp()
constexpr float ln::Math::lerp |
( |
float |
v1, |
|
|
float |
v2, |
|
|
float |
t |
|
) |
| |
|
staticnoexcept |
2つの値の間を線形補間します。
- Parameters
-
[in] | v1 | : 開始値 |
[in] | v2 | : 終了値 |
[in] | t | : 加重係数 |
- Returns
- 補間結果の値 t は通常、0.0~1.0 を指定します。
◆ quadAccel()
constexpr float ln::Math::quadAccel |
( |
float |
p, |
|
|
float |
v, |
|
|
float |
a, |
|
|
float |
t |
|
) |
| |
|
staticnoexcept |
等加速度運動の式で補間した値を計算します。
- Parameters
-
[in] | p | : 開始値 |
[in] | v | : 初速度 |
[in] | a | : 加速度 |
[in] | t | : 時間 |
- Returns
- 計算結果
The documentation for this class was generated from the following file:
- /home/runner/work/Website/Website/_Lumino/include/LuminoCore/Math/Math.hpp