This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Copyright Interfiber 2020-2021" | |
echo "Lua quickstart script." | |
echo "This script will download, and compile lua from source" | |
echo "Lua is very lightweight so this should not take that long" | |
echo "" | |
echo "" | |
echo "" | |
echo "stage: downloading lua..." | |
curl -#L https://www.lua.org/ftp/lua-5.4.2.tar.gz -o LUA_STAGE_DOWNLOAD.tar.gz | |
if ! test -f LUA_STAGE_DOWNLOAD.tar.gz; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __MATRIX_INCLUDED__ | |
#define __MATRIX_INCLUDED__ | |
#define IDENTITY_MATRIX float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) | |
float4x4 inverse(float4x4 m) { | |
float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0]; | |
float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1]; | |
float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2]; | |
float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][3]; |