示例#1
0
 //
 // Static Methods
 //
 public static fint Angle(FVector3 from, FVector3 to)
 {
     return(FMath.Acos(FMath.Clamp(FVector3.Dot(from.normalized, to.normalized), -fint.one, fint.one)) * FMath.Rad2Deg);
 }
示例#2
0
        public static FVector3 Lerp(FVector3 from, FVector3 to, fint t)
        {
            t = FMath.Clamp01(t);

            return(new FVector3(from.x + (to.x - from.x) * t, from.y + (to.y - from.y) * t, from.z + (to.z - from.z) * t));
        }
示例#3
0
 public static FVector3 Min(FVector3 lhs, FVector3 rhs)
 {
     return(new FVector3(FMath.Min(lhs.x, rhs.x), FMath.Min(lhs.y, rhs.y), FMath.Min(lhs.z, rhs.z)));
 }
示例#4
0
        public static fint Distance(FVector3 a, FVector3 b)
        {
            FVector3 vector = new FVector3(a.x - b.x, a.y - b.y, a.z - b.z);

            return(FMath.Sqrt(vector.x * vector.x + vector.y * vector.y + vector.z * vector.z));
        }