Correct cast error in HeadMountedDisplay.cpp

the method getPeriod should return a double and it was returning a float