Skip to content
This repository was archived by the owner on Dec 1, 2022. It is now read-only.
/ Quark Public archive

Commit 2b425c4

Browse files
committed
update readme
1 parent f11ed35 commit 2b425c4

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ Remark:
4545

4646
# API
4747

48+
Remark:
49+
```asm
50+
- Quark is a implement IComparable, IComparable<Quark> and IEquatable<Quark> interface;
51+
- Quark is a native marshaling compatible;
52+
- Quark is a gota go fast structure;
53+
```
54+
55+
4856
### ElectricChange
4957

5058
Base parse:
@@ -53,12 +61,27 @@ var e = ElectricChange.Token.Parse("+(1/2)")
5361
// has return new object
5462
{
5563
IsPositive: true,
56-
Value: "1/2"
64+
Numerator: 1,
65+
Denominator: 2
5766
}
5867

5968
e.ToString() // -> ["+(1/2)ℯ"]
6069
```
6170

71+
### Spin
72+
73+
Base parse:
74+
```CSharp
75+
var e = Spin.Token.Parse("(1/2)")
76+
// has return new object
77+
{
78+
Numerator: 1,
79+
Denominator: 2
80+
}
81+
82+
e.ToString() // -> ["(1/2)ħ"]
83+
```
84+
6285
### Quark
6386

6487

@@ -69,13 +92,13 @@ Base parse:
6992

7093
var qList = Quark.Token.Parse("[u|u|d]") // uud a quark structure of proton
7194
72-
qList.First().ToString() // -> [u +(2/3)ℯ 2.01 MeV]
95+
qList.First().ToString() // -> [u +(2/3)ℯ 2.3 MeV/c²]
7396
7497

7598
qList.First()
7699
// ->
77100
{
78-
Mass: new Energy(2.01, Energy.MegaElectronVolt),
101+
Mass: { Value: 2.3, Unit: 'MegaElectronVolt' }
79102
Symbol: 'u',
80103
Type: TopQuark,
81104
EChange: "+(2/3)"
@@ -86,7 +109,7 @@ qList.First()
86109
87110
var antiquark = Quark.Token.Parse("[-u]").First()
88111

89-
antiquark.ToString() // -> [ū +(2/3)ℯ 2.01 MeV]
112+
antiquark.ToString() // -> [ū -(2/3)ℯ 2.3 MeV/c²]
90113
antiquark.IsAnti() // -> True
91114
```
92115

0 commit comments

Comments
 (0)