mirror of
https://github.com/snowykami/mbcp.git
synced 2026-04-23 02:45:37 +00:00
📝 测试文档部署
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
任意角度。
|
||||
|
||||
@@ -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:
|
||||
|
||||
"""
|
||||
|
||||
@@ -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:
|
||||
是否近似相等
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user