mirror of https://github.com/CGAL/cgal
Use new style with make_array(), more compact and efficient
This commit is contained in:
parent
c10c7ebead
commit
ccff0db36d
|
|
@ -60,12 +60,8 @@ public:
|
|||
: base(CGALi::make_array(x, y)) {}
|
||||
|
||||
PointC2(const FT &hx, const FT &hy, const FT &hw)
|
||||
{
|
||||
if (hw != FT(1))
|
||||
base = CGALi::make_array(hx/hw, hy/hw);
|
||||
else
|
||||
base = CGALi::make_array(hx, hy);
|
||||
}
|
||||
: base( hw != FT(1) ? CGALi::make_array(hx/hw, hy/hw)
|
||||
: CGALi::make_array(hx, hy) ) {}
|
||||
|
||||
const FT& x() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,12 +57,8 @@ public:
|
|||
: base(CGALi::make_array(x, y, z)) {}
|
||||
|
||||
PointC3(const FT &x, const FT &y, const FT &z, const FT &w)
|
||||
{
|
||||
if (w != FT(1))
|
||||
base = CGALi::make_array(x/w, y/w, z/w);
|
||||
else
|
||||
base = CGALi::make_array(x, y, z);
|
||||
}
|
||||
: base( w != FT(1) ? CGALi::make_array(x/w, y/w, z/w)
|
||||
: CGALi::make_array(x, y, z) ) {}
|
||||
|
||||
/*
|
||||
bool operator==(const PointC3 &p) const
|
||||
|
|
|
|||
|
|
@ -56,12 +56,8 @@ public:
|
|||
: base(CGALi::make_array(x, y)) {}
|
||||
|
||||
VectorC2(const FT &hx, const FT &hy, const FT &hw)
|
||||
{
|
||||
if (hw != FT(1))
|
||||
base = CGALi::make_array(hx/hw, hy/hw);
|
||||
else
|
||||
base = CGALi::make_array(hx, hy);
|
||||
}
|
||||
: base( hw != FT(1) ? CGALi::make_array(hx/hw, hy/hw)
|
||||
: CGALi::make_array(hx, hy) ) {}
|
||||
|
||||
const FT & x() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -70,12 +70,8 @@ public:
|
|||
: base(CGALi::make_array(x, y, z)) {}
|
||||
|
||||
VectorC3(const FT &x, const FT &y, const FT &z, const FT &w)
|
||||
{
|
||||
if (w != FT(1))
|
||||
base = CGALi::make_array(x/w, y/w, z/w);
|
||||
else
|
||||
base = CGALi::make_array(x, y, z);
|
||||
}
|
||||
: base( w != FT(1) ? CGALi::make_array(x/w, y/w, z/w)
|
||||
: CGALi::make_array(x, y, z) ) {}
|
||||
|
||||
const FT & x() const
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue