Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 645

Help understanding "ref"

$
0
0
I'm having issues understanding the ref keyword. According do the documentation, you can check to see if a BoundingBox.D is intersecting with a LineD.

However, the Intersects method calls for a "ref LineD", like so
Code:
public bool Intersects(ref LineD line);
I'm not understanding how to create a "ref LineD" with my current code. I already have a method to create a certain line given certain conditions for an object. I don't even know why one would use a ref object in this case....

Help understanding "ref"

Viewing all articles
Browse latest Browse all 645

Trending Articles