public elemental function is_collinear(self, pt1, pt2, tolerance) result(is_collinear_)
Return true if the point is collinear with other two given points.
type ( vector ) :: pt ( 0 : 2 )
pt ( 0 ) = 3 * ex
pt ( 1 ) = 1 * ex
pt ( 2 ) = 2 * ex
print "(L1)" , pt ( 0 )% is_collinear ( pt1 = pt ( 1 ), pt2 = pt ( 2 ))
type ( vector ) :: pt ( 0 : 2 )
pt ( 0 ) = 3 * ex
pt ( 1 ) = 1 * ex
pt ( 2 ) = 2 * ex
print "(L1)" , is_collinear ( pt ( 0 ), pt1 = pt ( 1 ), pt2 = pt ( 2 ))
Arguments
Type Intent Optional Attributes Name
class(vector ),
intent(in)
::
self Vector.
type(vector ),
intent(in)
::
pt1 First line point.
type(vector ),
intent(in)
::
pt2 Second line point.
real(kind=R8P),
intent(in),
optional ::
tolerance Tolerance for collinearity check.
Return Value logical
Inquire result.
Called by
proc~~is_collinear~~CalledByGraph
proc~is_collinear
is_collinear
program~volatile_doctest~133
volatile_doctest
program~volatile_doctest~133->proc~is_collinear
Nodes of different colours represent the following:
Graph Key
Subroutine
Subroutine
Function
Function
Interface
Interface
Unknown Procedure Type
Unknown Procedure Type
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.