Just a pile of code that calculates your triangle square