您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
27 行
769 B
27 行
769 B
namespace Unity.UIWidgets.physics {
|
|
public class Tolerance {
|
|
public Tolerance(
|
|
float distance = _epsilonDefault,
|
|
float time = _epsilonDefault,
|
|
float velocity = _epsilonDefault
|
|
) {
|
|
this.distance = distance;
|
|
this.time = time;
|
|
this.velocity = velocity;
|
|
}
|
|
|
|
const float _epsilonDefault = 1e-3f;
|
|
|
|
public static readonly Tolerance defaultTolerance = new Tolerance();
|
|
|
|
public readonly float distance;
|
|
|
|
public readonly float time;
|
|
|
|
public readonly float velocity;
|
|
|
|
public override string ToString() {
|
|
return $"Tolerance(distance: ±{this.distance}, time: ±{this.time}, velocity: ±{this.velocity})";
|
|
}
|
|
}
|
|
}
|