/// <summary>
/// Multiplies a transform by another transform.
/// </summary>
/// <param name="a">First transform.</param>
/// <param name="b">Second transform.</param>
/// <param name="transform">Combined transform.</param>
public static void Multiply(ref AffineTransform a, ref AffineTransform b, out AffineTransform transform)
{
Matrix3x3 linearTransform;//Have to use temporary variable just in case a or b reference is transform.
Matrix3x3.Multiply(ref a.LinearTransform, ref b.LinearTransform, out linearTransform);
Vector3 translation;
Matrix3x3.Transform(ref a.Translation, ref b.LinearTransform, out translation);
Vector3.Add(ref translation, ref b.Translation, out transform.Translation);
transform.LinearTransform = linearTransform;
}