File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
crates/typst-library/src/math Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -3,32 +3,32 @@ use typst_syntax::Span;
33use crate :: foundations:: { elem, func, Content , NativeElement } ;
44use crate :: math:: Mathy ;
55
6- /// A square root.
6+ /// 平方根。
77///
88/// ```example
99/// $ sqrt(3 - 2 sqrt(2)) = sqrt(2) - 1 $
1010/// ```
1111#[ func( title = "Square Root" ) ]
1212pub fn sqrt (
1313 span : Span ,
14- /// The expression to take the square root of.
14+ /// 平方根を取る対象の式。
1515 radicand : Content ,
1616) -> Content {
1717 RootElem :: new ( radicand) . pack ( ) . spanned ( span)
1818}
1919
20- /// A general root.
20+ /// 一般的な累乗根。
2121///
2222/// ```example
2323/// $ root(3, x) $
2424/// ```
2525#[ elem( Mathy ) ]
2626pub struct RootElem {
27- /// Which root of the radicand to take.
27+ /// 被開数の何乗根を取るか。
2828 #[ positional]
2929 pub index : Option < Content > ,
3030
31- /// The expression to take the root of.
31+ /// 根を取る対象の式。
3232 #[ required]
3333 pub radicand : Content ,
3434}
Original file line number Diff line number Diff line change 6363 path : ["math"]
6464 filter : ["root", "sqrt"]
6565 details : |
66- Square and non-square roots.
66+ 平方根とその他の累乗根。
6767
68- # Example
68+ # 例
6969 ```example
7070 $ sqrt(3 - 2 sqrt(2)) = sqrt(2) - 1 $
7171 $ root(3, x) $
You can’t perform that action at this time.
0 commit comments