File: test_doxygen.f90

package info (click to toggle)
fortran-language-server 3.2.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,268 kB
  • sloc: python: 9,688; f90: 1,195; fortran: 30; makefile: 28; ansic: 20
file content (36 lines) | stat: -rw-r--r-- 1,270 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
module test_doxygen
    implicit none

contains

    !> @brief inserts a value into an ordered array
    !!
    !! An array "list" consisting of n ascending ordered values. The method insert a
    !! "new_entry" into the array.
    !! hint: use cshift and eo-shift
    !!
    !! @param[in,out]   list    a real array, size: max_size
    !! @param[in]       n       current values in the array
    !! @param[in]       max_size    size if the array
    !! @param[in]       new_entry   the value to insert
    subroutine insert(list, n, max_size, new_entry)
        real, dimension (:), intent (inout) :: list
        integer, intent (in) :: n, max_size
        real, intent (in) :: new_entry
    end subroutine insert

    !> @brief calcs the angle between two given vectors
    !!
    !! using the standard formula:
    !!  \f$\cos \theta = \frac{ \vec v \cdot \vec w}{\abs{v}\abs{w}}\f$.
    !!
    !! @param[in]   \f$v,w\f$   real vectors
    !!                      size: n
    !! @return  a real value describing the angle. 0 if \f$\abs v\f$ or \f$\abs w\f$ below a
    !!          threshold.
    pure function calc_angle(v, w) result (theta)
        real, dimension (:), intent (in) :: v, w
        real :: theta
    end function calc_angle

end module test_doxygen