Simulation Core
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CScaleRange.f90 453 B

12345678910111213141516
  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