クラス GcMath
Namespace: GameCanvas
csharp
public static class GcMathフィールド
s_Random
csharp
public static Random s_Randomメソッド
Abs(float)
csharp
public static float Abs(in float value)絶対値
Abs(int)
csharp
public static int Abs(in int value)絶対値
AlmostSame(float, float)
csharp
public static bool AlmostSame(in float a, in float b)計算誤差を考慮した同値判定
AlmostSame(float2, float2)
csharp
public static bool AlmostSame(in float2 a, in float2 b)計算誤差を考慮した同値判定
AlmostZero(float)
csharp
public static bool AlmostZero(in float value)計算誤差を考慮したゼロ判定
Atan2(float2)
csharp
public static float Atan2(in float2 v)ベクトルの角度
パラメーター
v— ベクトル
戻り値
ベクトルの角度(度数法)
Clamp(float, float, float)
csharp
public static float Clamp(in float value, in float min, in float max)Cos(float)
csharp
public static float Cos(in float degree)コサイン
パラメーター
degree— 角度(度数法)
Cross(float2, float2)
csharp
public static float Cross(in float2 a, in float2 b)ベクトルの外積
パラメーター
a— ベクトルAb— ベクトルB
戻り値
外積
Dot(float2, float2)
csharp
public static float Dot(in float2 a, in float2 b)ベクトルの内積
パラメーター
a— ベクトルAb— ベクトルB
戻り値
内積
GetRandomState()
csharp
public static uint GetRandomState()乱数のステートの取得
Max(float, float)
csharp
public static float Max(in float a, in float b)Min(float, float)
csharp
public static float Min(in float a, in float b)Random()
csharp
public static float Random()Random(float, float)
csharp
public static float Random(in float min, in float max)Random(int, int)
csharp
public static int Random(in int min, in int max)Repeat(float, float)
csharp
public static float Repeat(in float value, in float max)RotateVector(float2, float)
csharp
public static float2 RotateVector(in float2 v, in float degree)ベクトルの転回
パラメーター
v— 回転前のベクトルdegree— 回転量(度数法)
戻り値
回転後のベクトル
Round(double)
csharp
public static int Round(in double value)四捨五入
SetRandomSeed(uint)
csharp
public static void SetRandomSeed(in uint seed)乱数の種の設定
SetRandomSeedByIndex(uint)
csharp
public static void SetRandomSeedByIndex(in uint index)乱数の種を連番から設定
Sin(float)
csharp
public static float Sin(in float degree)サイン
パラメーター
degree— 角度(度数法)
Sqrt(float)
csharp
public static float Sqrt(in float value)平方根
