/// <summary> /// /// </summary> /// <param name="deg"> 弧度</param> /// <returns></returns> public LVector2 Rotate(LFloat deg) { var rad = LMath.Deg2Rad * deg; LFloat cos, sin; LMath.SinCos(out cos, out sin, rad); return(new LVector2(x * cos - y * sin, x * sin + y * cos)); }
public LVector3 RotateY(LFloat degree) { LFloat s; LFloat c; LMath.SinCos(out s, out c, new LFloat(true, degree._val * 31416L / 1800000L)); LVector3 vInt; vInt._x = (int)(((long)this._x * s._val + (long)this._z * c._val) / LFloat.Precision); vInt._z = (int)(((long)this._x * -c._val + (long)this._z * s._val) / LFloat.Precision); vInt._y = 0; return(vInt.normalized); }