📝 测试文档部署

This commit is contained in:
2024-08-28 22:07:43 +08:00
parent de42d34e38
commit 0d3511edd2
60 changed files with 9799 additions and 25 deletions

View File

@@ -14,6 +14,14 @@ title: mbcp.mp_math.equation
- epsilon: 偏移量
返回:
- 偏导函数
引发:
- ValueError 无效变量类型
<details>

View File

@@ -43,6 +43,10 @@ def __init__(self, point: 'Point3', direction: 'Vector3'):
- epsilon: 误差
返回:
- 是否近似相等
<details>
@@ -71,6 +75,14 @@ def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
- other: 另一条直线
返回:
- 夹角弧度
引发:
- TypeError 不支持的类型
<details>
@@ -100,6 +112,14 @@ def cal_angle(self, other: 'Line3') -> 'AnyAngle':
- other: 平行直线或点
返回:
- 距离
引发:
- TypeError 不支持的类型
<details>
@@ -142,6 +162,16 @@ def cal_distance(self, other: 'Line3 | Point3') -> float:
- other: 另一条直线
返回:
- 交点
引发:
- ValueError 直线平行
- ValueError 直线不共面
<details>
@@ -176,6 +206,10 @@ def cal_intersection(self, other: 'Line3') -> 'Point3':
- point: 指定点
返回:
- 垂线
<details>
@@ -203,6 +237,10 @@ def cal_perpendicular(self, point: 'Point3') -> 'Line3':
- t: 参数t
返回:
-
<details>
@@ -257,6 +295,10 @@ def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc,
- epsilon: 误差
返回:
- 是否近似平行
<details>
@@ -285,6 +327,10 @@ def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
- other: 另一条直线
返回:
- 是否平行
<details>
@@ -312,6 +358,10 @@ def is_parallel(self, other: 'Line3') -> bool:
- other: 另一条直线
返回:
- 是否共线
<details>
@@ -339,6 +389,10 @@ def is_collinear(self, other: 'Line3') -> bool:
- point: 点
返回:
- 是否在直线上
<details>
@@ -367,6 +421,10 @@ def is_point_on(self, point: 'Point3') -> bool:
- other: 另一条直线
返回:
- 是否共面
<details>
@@ -429,6 +487,10 @@ def simplify(self):
- p2: 点2
返回:
- 直线
<details>
@@ -459,6 +521,10 @@ def from_two_points(cls, p1: 'Point3', p2: 'Point3') -> 'Line3':
- other: 另一条直线
返回:
- 交点
<details>

View File

@@ -49,6 +49,10 @@ def __init__(self, a: float, b: float, c: float, d: float):
- other:
返回:
- 是否近似相等
<details>
@@ -88,6 +92,14 @@ def approx(self, other: 'Plane3') -> bool:
- other: 另一个平面
返回:
- 夹角弧度
引发:
- TypeError 不支持的类型
<details>
@@ -122,6 +134,14 @@ def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
- other: 另一个平面或点
返回:
- 距离
引发:
- TypeError 不支持的类型
<details>
@@ -156,6 +176,10 @@ def cal_distance(self, other: 'Plane3 | Point3') -> float:
- other: 另一个平面
返回:
- 交线
<details>
@@ -200,6 +224,14 @@ def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
- other: 不与平面平行或在平面上的直线
返回:
- 交点
引发:
- ValueError 平面与直线平行或重合
<details>
@@ -233,6 +265,10 @@ def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
- point: 指定点
返回:
- 平面
<details>
@@ -260,6 +296,10 @@ def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
- other: 另一个平面
返回:
- 是否平行
<details>
@@ -317,6 +357,10 @@ def normal(self) -> 'Vector3':
- normal: 法向量
返回:
- 平面
<details>
@@ -353,6 +397,10 @@ def from_point_and_normal(cls, point: 'Point3', normal: 'Vector3') -> 'Plane3':
- p3: 点3
返回:
- 平面
<details>
@@ -389,6 +437,10 @@ def from_three_points(cls, p1: 'Point3', p2: 'Point3', p3: 'Point3') -> 'Plane3'
- l2: 直线2
返回:
- 平面
<details>
@@ -425,6 +477,10 @@ def from_two_lines(cls, l1: 'Line3', l2: 'Line3') -> 'Plane3':
- line: 面上直线,不包含点
返回:
- 平面
<details>
@@ -515,6 +571,10 @@ def __and__(self, other: 'Plane3') -> 'Line3 | None':
- other:
返回:
- 不平行平面的交线平面平行返回None
<details>

View File

@@ -47,6 +47,10 @@ def __init__(self, x: float, y: float, z: float):
- epsilon:
返回:
- 是否近似相等
<details>

View File

@@ -14,6 +14,10 @@ title: mbcp.mp_math.utils
- max_:
返回:
- 限制后的值
<details>
@@ -48,6 +52,10 @@ def clamp(x: float, min_: float, max_: float) -> float:
- epsilon:
返回:
- 是否近似相等
<details>
@@ -80,6 +88,10 @@ def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
- only_neg: 是否只返回负数的符号
返回:
- 符号 + - ""
<details>
@@ -117,6 +129,10 @@ def sign(x: float, only_neg: bool=False) -> str:
- only_neg: 是否只返回负数的符号
返回:
- 符号 + - ""
<details>

View File

@@ -47,6 +47,10 @@ def __init__(self, x: float, y: float, z: float):
- epsilon:
返回:
- 是否近似相等
<details>
@@ -76,6 +80,10 @@ def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
- other: 另一个向量
返回:
- 夹角
<details>
@@ -103,6 +111,14 @@ def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
其余结果的模为平行四边形的面积。
参数:
- other:
返回:
- 行列式的结果
<details>
@@ -144,6 +160,10 @@ def cross(self, other: 'Vector3') -> 'Vector3':
- epsilon: 允许的误差
返回:
- 是否近似平行
<details>
@@ -172,6 +192,10 @@ def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
- other: 另一个向量
返回:
- 是否平行
<details>
@@ -377,6 +401,10 @@ def __add__(self, other):
- other:
返回:
- 是否相等
<details>