aspect_ratio Subroutine

private pure elemental subroutine aspect_ratio(this, ratio)

Calculates the aspect ratio of the image. Required for print_info method.

Arguments

Type IntentOptional Attributes Name
class(format_pnm), intent(in) :: this
real(kind=rk), intent(out) :: ratio

Called by

proc~~aspect_ratio~~CalledByGraph proc~aspect_ratio aspect_ratio proc~print_info format_pnm%print_info proc~print_info->proc~aspect_ratio program~demo_ppm demo_ppm program~demo_ppm->proc~print_info program~test test program~test->proc~print_info program~test1 test1 program~test1->proc~print_info program~test10 test10 program~test10->proc~print_info program~test11 test11 program~test11->proc~print_info program~test12 test12 program~test12->proc~print_info program~test13 test13 program~test13->proc~print_info program~test14 test14 program~test14->proc~print_info program~test17 test17 program~test17->proc~print_info program~test18 test18 program~test18->proc~print_info program~test19 test19 program~test19->proc~print_info program~test2 test2 program~test2->proc~print_info program~test20 test20 program~test20->proc~print_info program~test21 test21 program~test21->proc~print_info program~test22 test22 program~test22->proc~print_info program~test23 test23 program~test23->proc~print_info program~test24 test24 program~test24->proc~print_info program~test25 test25 program~test25->proc~print_info program~test3 test3 program~test3->proc~print_info program~test4 test4 program~test4->proc~print_info program~test6 test6 program~test6->proc~print_info program~test7 test7 program~test7->proc~print_info program~test8 test8 program~test8->proc~print_info program~test9 test9 program~test9->proc~print_info

Source Code

   elemental pure subroutine aspect_ratio(this, ratio)
      class(format_pnm), intent(in) :: this
      real(rk), intent(out) :: ratio
      ratio = real(this%width, kind=rk) / real(this%height, kind=rk)
   end subroutine aspect_ratio