CGAL Version:
master
6.0.1
latest
5.6.2
5.5.5
5.4.5
5.3.2
5.2.4
5.1.5
5.0.4
4.14.3
4.13.2
4.12.2
4.11.3
4.10.2
4.9.1
4.8.2
4.7
4.6.3
4.5.2
4.4
4.3
cgal.org
Top
Getting Started
Organization of the Manual
Package Overview
Acknowledging CGAL
CGAL 4.7 - 2D and 3D Linear Geometry Kernel
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
Pages
CGAL 4.7 - 2D and 3D Linear Geometry Kernel
User Manual
Reference Manual
Upgrading from CGAL::Object to boost::variant
Refinement Relationships
Deprecated List
Is Model Relationships
Has Model Relationships
Bibliographic References
Class and Concept List
Examples
Filtered_kernel/Filtered_predicate.cpp
Kernel_23/cartesian_converter.cpp
Kernel_23/exact.cpp
Kernel_23/intersections.cpp
Kernel_23/MyConstruct_bbox_2.h
Kernel_23/MyConstruct_coord_iterator.h
Kernel_23/MyConstruct_point_2.h
Kernel_23/MyKernel.cpp
Kernel_23/MyKernel.h
Kernel_23/MyPointC2.h
Kernel_23/points_and_segment.cpp
Kernel_23/surprising.cpp
Kernel_23/surprising.cpp
#include <iostream>
#include <CGAL/Simple_cartesian.h>
typedef
CGAL::Simple_cartesian<double>
Kernel
;
typedef
Kernel::Point_2
Point_2;
int
main()
{
{
Point_2 p(0, 0.3), q(1, 0.6), r(2, 0.9);
std::cout << (
CGAL::collinear
(p,q,r) ?
"collinear\n"
:
"not collinear\n"
);
}
{
Point_2 p(0, 1.0/3.0), q(1, 2.0/3.0), r(2, 1);
std::cout << (
CGAL::collinear
(p,q,r) ?
"collinear\n"
:
"not collinear\n"
);
}
{
Point_2 p(0,0), q(1, 1), r(2, 2);
std::cout << (
CGAL::collinear
(p,q,r) ?
"collinear\n"
:
"not collinear\n"
);
}
return
0;
}