Function parameter gives null. Dunno why.

You are passing the parameters by value, if you want to modify them pass by reference:


RandomPoint**(float &X, float &Y)**
{
...
}