To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 10406
    Simple Maths Help Needed —Tore Eriksson
   I'm ashamed to admit, but I have got stuck in a quite simple Maths problem. It's all about an implementation of the basic formula y=kx+m, but somehow I have managed to think the wrong way. Luckily, I made problems like this in a glanse back in (...) (19 years ago, 4-Feb-06, to lugnet.cad.dev)
   
        Re: Simple Maths Help Needed —Ross Crawford
   (...) I think what you want is: value = start_value + ((end_value - start_value) * (Progress - from) / (to - from)) HTH ROSCO (19 years ago, 4-Feb-06, to lugnet.cad.dev)
   
        Re: Simple Maths Help Needed —Tore Eriksson
   (...) Oh, how close I was, and yet... Thanks a lot, Rosco! /Tore (19 years ago, 4-Feb-06, to lugnet.cad.dev)
   
        Re: Simple Maths Help Needed —Timothy Gould
   (...) There is another way ;) (Start_value*(to-Pro.../(to-from) Is nice and symmetric and more numerically stable. Tim (19 years ago, 5-Feb-06, to lugnet.cad.dev)
   
        Re: Simple Maths Help Needed —Tore Eriksson
   (...) Rule #1: Never fix anything that's not broken! :) I need to make an if statement to take care of the exception where 'to' equals 'from', to avoid a division by zero crash anyway. Who knows what users can bring up... /Tore (19 years ago, 5-Feb-06, to lugnet.cad.dev)
 

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR