Changed how things are calculated to avoid FP where possible, and added the properties as elements  of the triangle struct.