View Source Scenic.Math.Matrix.Utils (Scenic v0.11.2)

Helper functions for working with matrices.

The matrix format for the main Scenic.Math.Matrix functions is a 64 byte binary blob containing 16 4-byte floats. This is great for doing the math in code, but not so great for reading or understanding the values by a human.

These functions transform more readable/writable formats into the binary blob and vice versa.

Link to this section Summary

Functions

Convert a readable format into a binary blob.

Convert a binary matrix into a list of 16 numbers.

Link to this section Functions

@spec to_binary(matrix :: Scenic.Math.matrix_list()) :: Scenic.Math.matrix()

Convert a readable format into a binary blob.

Parameters:

  • matrix_list - a list of 16 numbers

Returns: A binary matrix blob

Convert a binary matrix into a list of 16 numbers.

Parameters:

  • matrix - a binary matrix

Returns: A list of 16 numbers