
namespace XELF.Framework {

	public partial struct Matrix {
		/// <summary>
		/// スケーリング行列を作る。
		/// </summary>
		/// <param name="x">X</param>
		/// <param name="y">Y</param>
		/// <param name="z">Z</param>
		/// <param name="result"></param>
		public static void CreateScale(float x, float y, float z, out Matrix result) {
			result = new Matrix();
			result.M11 = x; result.M12 = 0; result.M13 = 0; result.M14 = 0;
			result.M21 = 0; result.M22 = y; result.M23 = 0; result.M24 = 0;
			result.M31 = 0; result.M32 = 0; result.M33 = z; result.M34 = 0;
			result.M41 = 0; result.M42 = 0; result.M43 = 0; result.M44 = 1;
		}
		/// <summary>
		/// スケーリング行列を作る。
		/// </summary>
		/// <param name="scale">スケール</param>
		/// <param name="result"></param>
		public static void CreateScale(float scale, out Matrix result) {
			CreateScale(scale, scale, scale, out result);
		}
	}

}
