line2 Derived Type

type, public :: line2


Contents


Components

TypeVisibility AttributesNameInitial
real(kind=real64), public :: m
real(kind=real64), public :: b

Type-Bound Procedures

procedure, public :: atx => line2_atx

Evaluate y = mx + b for a given x

  • public function line2_atx(self, x) result(y)

    Arguments

    Type IntentOptional AttributesName
    class(line2), intent(in) :: self
    real(kind=real64), intent(in) :: x

    Return Value real(kind=real64)

procedure, public :: aty => line2_aty

Evaluate y = mx + b for a given y

  • public function line2_aty(self, y) result(x)

    Arguments

    Type IntentOptional AttributesName
    class(line2), intent(in) :: self
    real(kind=real64), intent(in) :: y

    Return Value real(kind=real64)

procedure, public :: print => line2_print

  • public subroutine line2_print(self)

    Arguments

    Type IntentOptional AttributesName
    class(line2), intent(in) :: self

generic, public :: assignment(=) => from_two_points

  • public subroutine line2_from_two_point2(line, two_points)

    Arguments

    Type IntentOptional AttributesName
    class(line2), intent(out) :: line
    class(point2), intent(in), dimension(2), target:: two_points

procedure, public :: from_two_points => line2_from_two_point2

  • public subroutine line2_from_two_point2(line, two_points)

    Arguments

    Type IntentOptional AttributesName
    class(line2), intent(out) :: line
    class(point2), intent(in), dimension(2), target:: two_points