跳到主要内容

KBoundingBox2d.isEqual() method

在指定的容差下检查两个包围盒是否相等。

Check whether two bounding boxes are equal with specified tolerances.

Signature:

isEqual(other: KBoundingBox2d, tolerance?: number): boolean;

Links: isEqual(other: KBoundingBox2d, tolerance?: number): boolean;

Parameters

Parameter

Type

Description

other

KBoundingBox2d

需要被比较的包围盒。

The bounding box to compare this bounding box with.

tolerance

number

(Optional) 指定容差·1,默认值是1e-6。

The specified tolerance.The default value is 1e-6.

Returns:

boolean

两者相等返回true,否则为false。

Return true if equal, otherwise return false.