Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
453 B

  1. module CScaleRange
  2. implicit none
  3. public
  4. contains
  5. real function ScaleRange(x, toMin, toMax, fromMin, fromMax)
  6. implicit none
  7. real, intent(in) :: x
  8. real, intent(in) :: toMin
  9. real, intent(in) :: toMax
  10. real, intent(in) :: fromMin
  11. real, intent(in) :: fromMax
  12. ScaleRange = ((toMax - toMin)*(x - fromMin)/(fromMax - fromMin)) + toMin
  13. end function
  14. end module CScaleRange