Integer scaling should map endpoints correctly for the RGB range [0,255].
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_019(id, nfail) use forcolormap_parameters, only: wp use forcolormap_utils, only: scale integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "scale(real,int): endpoints map to [a,b] for [0,255]" logical :: ok real(wp) :: x(3) integer :: y(3) x = [ -2.0_wp, 0.0_wp, 2.0_wp ] y = scale(x, 0, 255) ok = (y(1) == 0) .and. (y(3) == 255) call report_test(name, ok, id, nfail) end subroutine test_019