Fix space.
Add getRandomDouble() function.
Fix vector index bug and change new value into a double.