Пример #1
0
 public void Repeat(float min, float max, out Vector2 result)
 {
     result.X = FMath.Repeat(this.X, min, max);
     result.Y = FMath.Repeat(this.Y, min, max);
 }
Пример #2
0
 public void Slerp(ref Vector2 v, float f, out Vector2 result)
 {
     result = this.Rotate(this.Angle(v) * f) * FMath.Lerp(1f, v.Length() / this.Length(), f);
 }
Пример #3
0
 public void Repeat(ref Vector2 min, ref Vector2 max, out Vector2 result)
 {
     result.X = FMath.Repeat(this.X, min.X, max.X);
     result.Y = FMath.Repeat(this.Y, min.Y, max.Y);
 }
Пример #4
0
 public static float Wrap(float x, float min, float max)
 {
     return(FMath.Repeat(x, min, max));
 }
Пример #5
0
        public static float SmoothStep(float min, float max, float x)
        {
            float num = FMath.LinearStep(min, max, x);

            return(num * num * (3f - num - num));
        }
Пример #6
0
 public void Slerp(ref Vector3 v, float f, out Vector3 result)
 {
     result = Matrix4.RotationAxis(this.Cross(v), this.Angle(v) * f).TransformVector(this) * FMath.Lerp(1f, v.Length() / this.Length(), f);
 }
Пример #7
0
 public void Repeat(ref Vector3 min, ref Vector3 max, out Vector3 result)
 {
     result.X = FMath.Repeat(this.X, min.X, max.X);
     result.Y = FMath.Repeat(this.Y, min.Y, max.Y);
     result.Z = FMath.Repeat(this.Z, min.Z, max.Z);
 }