/// <summary> /// 向量旋转 /// </summary> /// <param name="start"></param> /// <param name="end"></param> /// <param name="max_radians"></param> /// <returns></returns> public static VInt3 RotateTowards(VInt3 start, VInt3 end, VFactor max_radians) { VFactor angle = AngleInt(start, end); if (angle == VFactor.zero) { return(end); } VFactor percent = IntMath.Min(max_radians / angle, VFactor.one); return(Slerp(start, end, percent)); }