Skip to content

インターフェイス IMathEx

Namespace: GameCanvas

csharp
public interface IMathEx : IMath

継承元

メソッド

Abs(float)

継承元: IMath

csharp
float Abs(in float value)

絶対値を計算します

パラメーター

  • value — 入力値

戻り値

絶対値

Abs(int)

継承元: IMath

csharp
int Abs(in int value)

絶対値を計算します

パラメーター

  • value — 入力値

戻り値

絶対値

AlmostSame(float, float)

継承元: IMath

csharp
bool AlmostSame(in float a, in float b)

計算誤差を考慮して同値かどうか判定します

戻り値

同値かどうか

AlmostZero(float)

継承元: IMath

csharp
bool AlmostZero(in float value)

計算誤差を考慮してゼロかどうか判定します

パラメーター

  • value — 入力値

戻り値

ゼロかどうか

Atan2(float, float)

csharp
float Atan2(in float x, in float y)

ベクトルとX+軸平面のなす角度を計算します

パラメーター

  • x — ベクトルのX軸の大きさ
  • y — ベクトルのY軸の大きさ

戻り値

角度(度数法)

Atan2(float2)

継承元: IMath

csharp
float Atan2(in float2 v)

ベクトルとX+軸平面のなす角度を計算します

パラメーター

  • v — ベクトル

戻り値

角度(度数法)

Clamp(float, float, float)

継承元: IMath

csharp
float Clamp(in float value, in float min, in float max)

値を丸めます

パラメーター

  • value — 入力値
  • min — 最小値
  • max — 最大値

Cos(float)

継承元: IMath

csharp
float Cos(in float degree)

コサインを計算します

パラメーター

  • degree — 角度(度数法)

戻り値

コサイン

Cross(float2, float2)

継承元: IMath

csharp
float Cross(in float2 a, in float2 b)

ベクトルの外積を計算します

戻り値

外積

Dot(float2, float2)

継承元: IMath

csharp
float Dot(in float2 a, in float2 b)

ベクトルの内積を計算します

戻り値

内積

GetRandomState()

継承元: IMath

csharp
uint GetRandomState()

乱数計算の現在の状態(≒シード値)を取得します

戻り値

シード値

Max(float, float)

継承元: IMath

csharp
float Max(in float a, in float b)

2つの値を比較して、より大きい方を返します

戻り値

大きい方の値

Min(float, float)

継承元: IMath

csharp
float Min(in float a, in float b)

2つの値を比較して、より小さい方を返します

戻り値

小さい方の値

Random()

継承元: IMath

csharp
float Random()

0以上1未満のランダムな値を算出します

戻り値

ランダムな値

Random(float, float)

継承元: IMath

csharp
float Random(in float min, in float max)

min以上max未満のランダムな値を算出します

パラメーター

  • min — 最小値
  • max — 最大値

戻り値

ランダムな値

Random(int, int)

継承元: IMath

csharp
int Random(in int min, in int max)

min以上max以下のランダムな値を算出します

パラメーター

  • min — 最小値
  • max — 最大値

戻り値

ランダムな値

Repeat(float, float)

継承元: IMath

csharp
float Repeat(in float value, in float max)

値を 0 から max までの範囲を繰り返すよう値を丸めます

パラメーター

  • value — 入力値
  • max — 最大値

RotateVector(float2, float)

継承元: IMath

csharp
float2 RotateVector(in float2 vector, in float degree)

ベクトルを回転します

パラメーター

  • vector — ベクトル
  • degree — 回転量(度数法)

戻り値

回転後のベクトル

Round(double)

継承元: IMath

csharp
int Round(in double value)

値を四捨五入します

パラメーター

  • value — 入力値

戻り値

四捨五入された値

Round(float)

継承元: IMath

csharp
int Round(in float value)

値を四捨五入します

パラメーター

  • value — 入力値

戻り値

四捨五入された値

SetRandomSeed(uint)

継承元: IMath

csharp
void SetRandomSeed(in uint seed)

乱数計算のシード値を設定します

パラメーター

  • seed — シード値

SetRandomSeedByIndex(uint)

継承元: IMath

csharp
void SetRandomSeedByIndex(in uint index)

乱数計算のシード値をインデックスから設定します

パラメーター

  • index — インデックス

Sin(float)

継承元: IMath

csharp
float Sin(in float degree)

サインを計算します

パラメーター

  • degree — 角度(度数法)

戻り値

サイン

Sqrt(float)

継承元: IMath

csharp
float Sqrt(in float value)

平方根を計算します

パラメーター

  • value — 入力値

戻り値

平方根

Released under the MIT License.