📝 测试文档部署

This commit is contained in:
2024-08-28 12:02:30 +08:00
parent f5d91cafd5
commit e0a3ab605d
39 changed files with 2811 additions and 819 deletions

View File

@@ -15,7 +15,11 @@ from .const import PI # type: ignore
from .utils import approx
class AnyAngle:
class Angle:
...
class AnyAngle(Angle):
def __init__(self, value: float, is_radian: bool = False):
"""
任意角度。

View File

@@ -18,9 +18,10 @@ class CurveEquation:
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
"""
曲线方程。
:param x_func:
:param y_func:
:param z_func:
Args:
x_func: x函数
y_func: y函数
z_func: z函数
"""
self.x_func = x_func
self.y_func = y_func
@@ -31,7 +32,7 @@ class CurveEquation:
计算曲线上的点。
Args:
*t:
参数
Returns:
"""

View File

@@ -32,12 +32,11 @@ class Plane3:
self.c = c
self.d = d
def approx(self, other: 'Plane3', epsilon: float = APPROX) -> bool:
def approx(self, other: 'Plane3') -> bool:
"""
判断两个平面是否近似相等。
Args:
other:
epsilon:
Returns:
是否近似相等

View File

@@ -62,15 +62,15 @@ class Point3:
"""
return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)
def __sub__(self, other: "Point3") -> "Vector3":
"""
P - P -> V
P - V -> P 已在 :class:`Vector3` 中实现
Args:
other:
Returns:
"""
from .vector import Vector3
return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)
# def __sub__(self, other: "Point3") -> "Vector3":
# """
# P - P -> V
#
# P - V -> P 已在 :class:`Vector3` 中实现
# Args:
# other:
# Returns:
#
# """
# from .vector import Vector3
# return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)