static functions zero() an one() added to points

This commit is contained in:
Luigi Malomo 2017-07-27 14:47:49 +02:00
parent 8fe2f730a1
commit 59ccf586c4
3 changed files with 25 additions and 0 deletions

View File

@ -309,6 +309,16 @@ public:
return Point2(b.X(),b.Y());
}
static inline Point2 Zero(void)
{
return Point2(0,0);
}
static inline Point2 One(void)
{
return Point2(1,1);
}
}; // end class definition

View File

@ -208,6 +208,11 @@ public:
return Point3(0,0,0);
}
static inline Point3 One(void)
{
return Point3(1,1,1);
}
//@}
//@{

View File

@ -128,6 +128,16 @@ public:
return Point4(T(b[0]),T(b[1]),T(b[2]),T(b[3]));
}
static inline Point4 Zero(void)
{
return Point4(0,0,0,0);
}
static inline Point4 One(void)
{
return Point4(1,1,1,1);
}
//@}
//@{