From 2017590ef6ebb27a6c3ae0d9d7880a0fa6dd9b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 2 Dec 2021 15:45:18 +0100 Subject: AABB: Improve docs and test for `has_point` Contrarily to the 2D Rect2i counterpart, it doesn't make much sense in 3D and for floating-point AABBs to exclude points on some of its faces. --- doc/classes/AABB.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index ac45682feb..bdf8a78dc3 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -158,14 +158,15 @@ - Returns [code]true[/code] if the [AABB] contains a point. + Returns [code]true[/code] if the [AABB] contains a point. Points on the faces of the AABB are considered included, though float-point precision errors may impact the accuracy of such checks. + [b]Note:[/b] This method is not reliable for [AABB] with a [i]negative size[/i]. Use [method abs] to get a positive sized equivalent [AABB] to check for contained points. - Returns the intersection between two [AABB]. An empty AABB (size 0,0,0) is returned on failure. + Returns the intersection between two [AABB]. An empty AABB (size [code](0, 0, 0)[/code]) is returned on failure. -- cgit v1.2.3