File: mod/geometry.f90
1! --------------------------------------------------------------------------------------------------2! SPDX-License-Identifier: Apache-2.03! SPDX-FileCopyrightText: 2026 cpdocs developers4! --------------------------------------------------------------------------------------------------5!> Geometry primitives.6module geometry7 implicit none8 private9 public :: vector3, dot10 11 !> A three-dimensional vector.12 type :: vector313 real :: x14 real :: y15 real :: z16 end type vector317 18contains19 20 !> Return the dot product of two vectors.21 real function dot(lhs, rhs) result(value)22 type(vector3), intent(in) :: lhs, rhs23 value = lhs%x * rhs%x + lhs%y * rhs%y + lhs%z * rhs%z24 end function dot25 26end module geometry