Implemented primitiveRootsOfUnity method.
The rootsOfUnity method doesn't work well due to precision problems when
calculating (cos(PI/4) != 0 because PI/4 is a floating point number,
it's equal to almost 0, which causes trouble). Considering switching to
degrees or searching for a library that solves it.