mirror of
https://github.com/apache/nuttx.git
synced 2026-08-03 05:09:00 +00:00
Add vectsubtract() and rectinside()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1371 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
676c0e2798
commit
7322ee4547
4 changed files with 195 additions and 2 deletions
|
|
@ -351,6 +351,18 @@ EXTERN void nxgl_vectoradd(FAR struct nxgl_point_s *dest,
|
|||
FAR const struct nxgl_point_s *v1,
|
||||
FAR const struct nxgl_point_s *v2);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxgl_vectorsubtract
|
||||
*
|
||||
* Description:
|
||||
* Add subtract vector v2 from vector v1 and return the result in vector dest
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN void nxgl_vectorsubtract(FAR struct nxgl_point_s *dest,
|
||||
FAR const struct nxgl_point_s *v1,
|
||||
FAR const struct nxgl_point_s *v2);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxgl_rectintersect
|
||||
*
|
||||
|
|
@ -401,6 +413,17 @@ EXTERN void nxgl_nonintersecting(FAR struct nxgl_rect_s result[4],
|
|||
EXTERN boolean nxgl_rectoverlap(FAR struct nxgl_rect_s *rect1,
|
||||
FAR struct nxgl_rect_s *rect2);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxgl_rectinside
|
||||
*
|
||||
* Description:
|
||||
* Return TRUE if the point pt lies within rect.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
EXTERN boolean nxgl_rectinside(FAR const struct nxgl_rect_s *rect,
|
||||
FAR const struct nxgl_point_s *pt);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxgl_nullrect
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue