static void WindowtoViewport ( int x_w , int y_w , int x_wmax , int y_wmax , int x_wmin , int y_wmin , int x_vmax , int y_vmax , int x_vmin , int y_vmin ) {
  int x_v , y_v ;
  float sx , sy ;
  sx = ( float ) ( x_vmax - x_vmin ) / ( x_wmax - x_wmin ) ;
  sy = ( float ) ( y_vmax - y_vmin ) / ( y_wmax - y_wmin ) ;
  x_v = ( int ) ( x_vmin + ( float ) ( ( x_w - x_wmin ) * sx ) ) ;
  y_v = ( int ) ( y_vmin + ( float ) ( ( y_w - y_wmin ) * sy ) ) ;
  System . out . printf ( "The point on viewport: (%d, %d )\n " , x_v , y_v ) ;
}

static void WindowtoViewport ( int x_w , int y_w , int x_wmax , int y_wmax , int x_wmin , int y_wmin , int x_vmax , int y_vmax , int x_vmin , int y_vmin ) { int x_v , y_v ; float sx , sy ; sx = ( float ) ( x_vmax - x_vmin ) / ( x_wmax - x_wmin ) ; sy = ( float ) ( y_vmax - y_vmin ) / ( y_wmax - y_wmin ) ; x_v = ( int ) ( x_vmin + ( float ) ( ( x_w - x_wmin ) * sx ) ) ; y_v = ( int ) ( y_vmin + ( float ) ( ( y_w - y_wmin ) * sy ) ) ; System . out . printf ( " The ▁ point ▁ on ▁ viewport : ▁ ( % d , ▁ % d ▁ ) \n ▁ " , x_v , y_v ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (floating_point_type) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (floating_point_type) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (integral_type) value: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (floating_point_type) value: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier))))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (integral_type) value: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (floating_point_type) value: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier))))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal) (identifier) (identifier))))))