public static RotateX ( this v, float angle ) : void | ||
v | this | |
angle | float | |
리턴 | void |
public static void RotateX(this Vector3 v, float angle)
{
float sin = Mathf.Sin(angle);
float cos = Mathf.Cos(angle);
float ty = v.y;
float tz = v.z;
v.y = (cos * ty) - (sin * tz);
v.z = (cos * tz) + (sin * ty);
}