diff --git a/math/README.md b/math/README.md index 64657c2d8e54c2efe8ccda5b5b57c871883be2c9..b863bf9d05ff00176a200f7c06fde134f129cb98 100644 --- a/math/README.md +++ b/math/README.md @@ -114,76 +114,76 @@ sin sqrt tan trunc 若 `x` 为有限的,则返回 `True` 。 -- `mathisinf`(*x*) +- `math.isinf`(*x*) 若 `x` 为无限,则返回 `True` 。 -- `mathisnan`(*x*) +- `math.isnan`(*x*) 若 `x` 非数字,则返回 `True` 。 -- `mathldexp`(*x*, *exp*) +- `math.ldexp`(*x*, *exp*) 返回 `x * (2**exp)`. -- `mathlgamma`(*x*) +- `math.lgamma`(*x*) 返回 `x` 的伽玛函数的自然对数。 -- `mathlog`(*x*) +- `math.log`(*x*) 返回 `x` 的自然对数。 -- `mathlog10`(*x*) +- `math.log10`(*x*) 返回 `x` 以10为底的对数。 -- `mathlog2`(*x*) +- `math.log2`(*x*) 返回 `x` 以2为底的对数。 -- `mathmodf`(*x*) +- `math.modf`(*x*) 返回包含两个浮点值的元组,即x的分数和积分部分。两个返回值都与 `x` 有同样标记。 -- `mathpow`(*x*, *y*) +- `math.pow`(*x*, *y*) 将 `x` 返回 `y` 的幂。 -- `mathradians`(*x*) +- `math.radians`(*x*) 返回度数 `x` 的弧度。 -- `mathsin`(*x*) +- `math.sin`(*x*) 返回 `x` 的正弦函数。 -- `mathsinh`(*x*) +- `math.sinh`(*x*) 返回的 `x` 双曲正弦函数。 -- `mathsqrt`(*x*) +- `math.sqrt`(*x*) 返回 `x` 的平方根. -- `mathtan`(*x*) +- `math.tan`(*x*) 返回 `x` 的正切函数。 -- `mathtanh`(*x*) +- `math.tanh`(*x*) 返回 `x` 的双曲正切函数。 -- `mathtrunc`(*x*) +- `math.trunc`(*x*) 截尾函数,返回 `x` 的整数部分。 ### 常量 -- `mathe` +- `math.e` 自然对数的底。 -- `mathpi` +- `math.pi` 一个圆的周长与其直径的比值。 \ No newline at end of file diff --git a/st7789/README.md b/st7789/README.md index 256dffaa4028fc475c3a2963c18026cab37077a8..d909cd6ba885ac29fff31eeea33996602225fa53 100644 --- a/st7789/README.md +++ b/st7789/README.md @@ -58,7 +58,19 @@ display.draw_string(50, 230, "Powered by BlackWalnuut Labs.") 直接复制 `bytes()` 或 `bytearray()` 的内容到屏幕内部缓冲区 -模块其他颜色定义:`BLACK`, `BLUE`, `RED`, `GREEN`, `CYAN`, `MAGENTA`, `YELLOW` 和 `WHITE` + +- `ST7789.draw_string(x, y, str, color=ST7789.WHITE, bg=ST7789.WHITE, size=1, vertical=False, rotate=ST7789.ROTATE_0)` + + 从指定带点 (x, y) 绘制字符串。 + - color: 指定字符串字体颜色 + - bg: 字符串背景颜色,当color和bg相同时,背景色不生效 + - size:字符串字体大小,必须为正整数 + - vertica:启用竖直排列 + - rorate:宣传角度,仅支持 `ROTATE_0`, `ROTATE_90`, `ROTATE_180`, `ROTATE_270` + +模块其他旋转角度定义:`ST7789.ROTATE_0`, `ST7789.ROTATE_90`, `ST7789.ROTATE_180`, `ST7789.ROTATE_270` + +模块其他颜色定义:`ST7789.BLACK`, `ST7789.BLUE`, `ST7789.RED`, `ST7789.GREEN`, `ST7789.CYAN`, `ST7789.MAGENTA`, `YELLOW` 和 `ST7789.WHITE` ## 模块其他方法 ----------------