Math help needed!!

I wish to make a script to define the length of a line.
Knowing the deltaX, deltaY and hypotenuse of a line, how can i, giving the new lenght (hypotenuse), found the new deltaX and deltaY?

Thank you very much!!!

Find the ratio between the old hypotenuse and the new. (new/old)

Then multiply the deltax and deltay values by this.

This increases all of the values proportionally.

eg:
old hyp: 5
old dx: 4
old dy: 3

new hyp: 10
ratio = 10/5=2
new dx = 24=8
dew dy= 2
3 = 6

Ian

Thank you very much!!!

p.s. very clever solution!!

No problem. It works in three dimensions as well, just do the same to dz.