fortran_geometry API documentation
Project documentation Docs

File: lib/normalize.f90

1! --------------------------------------------------------------------------------------------------2! SPDX-License-Identifier: Apache-2.03! SPDX-FileCopyrightText: 2026 cpdocs developers4! --------------------------------------------------------------------------------------------------5! Implementation-only helper. It is browseable in the file hierarchy but is not part of the API.6subroutine normalize_impl(x, y, z)7  real, intent(inout) :: x, y, z8  real :: length9  length = sqrt(x*x + y*y + z*z)10  if (length > 0.0) then11    x = x / length12    y = y / length13    z = z / length14  end if15end subroutine normalize_impl