Simulation Core
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

17 行
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