How do I call an FVector function with multiple &args

I want to call FVector::ToDirectionAndLength, which according to the definition takes an &FVector and a &float. Which I understand is saying these will be modified inside the function. The problem is I can’t figure out the syntax to call the function itself, assuming I have my FVector and float declared like this inside my cpp file:

FVector FVtoBeModified;
float fLength;

I’ve tried various ways of calling it, using FVector::ToDirblabla and FVector->ToDirblabla and even FVector.ToDirblablabla, passing in FVtoBeModified and fLength as arguments obvious but get various errors from intellisense. I’m obviously pretty new to c++ so I must be missing some kind of scope management to make this work.

Thanks for any insight!

Like this:

FVector SomeVector;
FVector Direction;
float Length;

SomeVector.ToDirectionAndLength(Direction, Length);

If you want to store into the same vector, you might be able to do:

FVector SomeVector;
float Length;

SomeVector.ToDirectionAndLength(SomeVector, Length);

But I wouldn’t do that because it’s not really clear what you are doing as far as code goes.

Thanks very much, totally worked for what I needed to do!

If you hit the little check mark it will mark your question as answered.