I need to draw some vectors (defining different speeds in Km/h) inside a Canvas. If I use the speed value (module) of the vectors, their length exceeds the limits of the Canvas (width and height) so I need to scale them maintaining the relative proportions (i.e. if vector A is twice vector B, it must stay so in the drawing as well).
I really have no idea how to do it. I found a Xojo example (it is called Newton27, don't remember where I got it) which scales vector but it is very difficult to follow the process because it jumps through different methods and properties.
I'm looking for something fairly simple, if someone has already tackled the same problem in his/her coding.