@galacean/engine-math 0.0.0-experimental-0.9-plus.8 → 0.0.0-experimental-double11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-math",
3
- "version": "0.0.0-experimental-0.9-plus.8",
3
+ "version": "0.0.0-experimental-double11.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -98,6 +98,13 @@ export declare class CollisionUtil {
98
98
  * @returns True if bounding box intersects with this frustum, false otherwise
99
99
  */
100
100
  static intersectsFrustumAndBox(frustum: BoundingFrustum, box: BoundingBox): boolean;
101
+ /**
102
+ * Get the containment type between a frustum and a point.
103
+ * @param frustum - The frustum
104
+ * @param point - The point
105
+ * @returns The containment type
106
+ */
107
+ static frustumContainsPoint(frustum: BoundingFrustum, point: Vector3): ContainmentType;
101
108
  /**
102
109
  * Get the containment type between a frustum and a box (AABB).
103
110
  * @param frustum - The frustum
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Random number generator based on the xorshift128+ algorithm.
3
+ * https://vigna.di.unimi.it/ftp/papers/xorshiftplus.pdf
4
+ */
5
+ export declare class Rand {
6
+ private _state0;
7
+ private _state1;
8
+ /**
9
+ * Create a random number generator.
10
+ * @param seed0 - Seed 0 used to initialize the generator
11
+ * @param seed1 - Seed 1 used to initialize the generator
12
+ */
13
+ constructor(seed0: number, seed1: number);
14
+ /**
15
+ * Generate a integer 32bit random number.
16
+ * @returns - A random number
17
+ */
18
+ randomInt32(): number;
19
+ /**
20
+ * Generate a number between 0 and 1.
21
+ * @returns - A random number
22
+ */
23
+ random(): number;
24
+ /**
25
+ * Reset the generator by new seeds.
26
+ * @param seed0 - Random seed0
27
+ * @param seed1 - Random seed1
28
+ */
29
+ reset(seed0: number, seed1: number): void;
30
+ }
package/types/Rect.d.ts CHANGED
@@ -1,14 +1,26 @@
1
1
  import { IClone } from "./IClone";
2
2
  import { ICopy } from "./ICopy";
3
3
  export declare class Rect implements IClone<Rect>, ICopy<Rect, Rect> {
4
- /** The x coordinate of the rectangle. */
5
- x: number;
6
- /** The y coordinate of the rectangle. */
7
- y: number;
8
- /** The width of the rectangle, measured from the x position. */
9
- width: number;
10
- /** The height of the rectangle, measured from the y position. */
11
- height: number;
4
+ /**
5
+ * The x coordinate of the rectangle.
6
+ */
7
+ get x(): number;
8
+ set x(value: number);
9
+ /**
10
+ * The y coordinate of the rectangle.
11
+ */
12
+ get y(): number;
13
+ set y(value: number);
14
+ /**
15
+ * The width of the rectangle, measured from the x position.
16
+ */
17
+ get width(): number;
18
+ set width(value: number);
19
+ /**
20
+ * The height of the rectangle, measured from the y position.
21
+ */
22
+ get height(): number;
23
+ set height(value: number);
12
24
  /**
13
25
  * Constructor of Rect.
14
26
  * @param x - The x coordinate of the rectangle, default 0