cross Function

public pure function cross(a, b) result(c)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: a(3)
real(kind=dp), intent(in) :: b(3)

Return Value real(kind=dp), (3)


Called by

proc~~cross~~CalledByGraph proc~cross cross proc~segment_triangle_intersect segment_triangle_intersect proc~segment_triangle_intersect->proc~cross proc~find_first_hit_base_grid find_first_hit_base_grid proc~find_first_hit_base_grid->proc~segment_triangle_intersect proc~find_first_hit_base_linear find_first_hit_base_linear proc~find_first_hit_base_linear->proc~segment_triangle_intersect proc~find_first_hit_base find_first_hit_base proc~find_first_hit_base->proc~find_first_hit_base_grid proc~find_first_hit_base->proc~find_first_hit_base_linear proc~find_first_hit find_first_hit proc~find_first_hit->proc~find_first_hit_base proc~find_first_hit_periodic2 find_first_hit_periodic2 proc~find_first_hit->proc~find_first_hit_periodic2 proc~find_first_hit_periodic2->proc~find_first_hit_base proc~sample_photo_raycast_particles sample_photo_raycast_particles proc~sample_photo_raycast_particles->proc~find_first_hit proc~sample_photo_species_state sample_photo_species_state proc~sample_photo_species_state->proc~sample_photo_raycast_particles proc~init_particle_batch_from_config init_particle_batch_from_config proc~init_particle_batch_from_config->proc~sample_photo_species_state

Source Code

  pure function cross(a, b) result(c)
    real(dp), intent(in) :: a(3), b(3)
    real(dp) :: c(3)
    c(1) = a(2)*b(3) - a(3)*b(2)
    c(2) = a(3)*b(1) - a(1)*b(3)
    c(3) = a(1)*b(2) - a(2)*b(1)
  end function cross