Scenic v0.9.0 Scenic.Math View Source

Helper functions that support Scenic mathematical operations.

The math functions are fairly straightforward. When performance is needed some have been broken out into a NIF.

The NIF functions are currently written for compatibility over top speed and as such, there is an opportunity to further improve them by calling out to CPU-specific vector instructions in the future.

Link to this section Summary

Link to this section Types

Link to this type line() View Source
line() :: {p0 :: point(), p1 :: point()}
Link to this type matrix_list() View Source
matrix_list() :: [number()]
Link to this type point() View Source
point() :: {x :: number(), y :: number()}
Link to this type quad() View Source
quad() :: {p0 :: point(), p1 :: point(), p2 :: point(), p3 :: point()}
Link to this type triangle() View Source
triangle() :: {p0 :: point(), p1 :: point(), p2 :: point()}
Link to this type vector_2() View Source
vector_2() :: {x :: number(), y :: number()}