Update Triangle.cpp

using a linear space