This is correct, the 2 sides you are using is the vector’s X and Y component to form a right triangle. The pythagorean theorem on a vector alone will result in it’s length (squared). This length is used to normalize the vector, dividing each component forms a ratio of the length from 0 to 1, or a direction. Maybe you got the direction value from a position.direction_to(mouse_position)
, which uses the same formulas. Now if you multiply each direction component by your distance you will get a vector with a length matching the distance provided and pointing in that direction.
tldr: what @grulps said