Get the identity matrix:
let identityMatrix = float3x3.identityCreate a translation matrix:
let translation = float3x3.translate(value: SIMD2<Float32>(x: 10, y: 5))Create a rotation matrix:
let rotation = float3x3.rotate(angle: Angle(degrees: 45))Create a scaling matrix:
let scaling = float3x3.scale(value: SIMD2<Float32>(x: 2, y: 3))Encode and decode float3x3 matrices:
let matrix = float3x3.identity
// Encoding
let encoder = JSONEncoder()
let encodedData = try encoder.encode(matrix)
// Decoding
let decoder = JSONDecoder()
let decodedMatrix = try decoder.decode(float3x3.self, from: encodedData)