File tree Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
+ ///|
16
+ pub let max_value : Int16 = 32767
17
+
18
+ ///|
19
+ pub let min_value : Int16 = - 32768
20
+
15
21
///|
16
22
pub fn op_add (self : Int16 , that : Int16 ) -> Int16 {
17
23
(self .to_int () + that .to_int ()).to_int16 ()
Original file line number Diff line number Diff line change 1
1
package moonbitlang/core/int16
2
2
3
3
// Values
4
+ let max_value : Int16
5
+
6
+ let min_value : Int16
4
7
5
8
// Types and methods
6
9
impl Int16 {
Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
+ ///|
16
+ pub let max_value : UInt16 = 65535
17
+
18
+ ///|
19
+ pub let min_value : UInt16 = 0
20
+
15
21
///|
16
22
pub fn op_add (self : UInt16 , that : UInt16 ) -> UInt16 {
17
23
(self .to_int () + that .to_int ()).to_uint16 ()
Original file line number Diff line number Diff line change 1
1
package moonbitlang/core/uint16
2
2
3
3
// Values
4
+ let max_value : UInt16
5
+
6
+ let min_value : UInt16
4
7
5
8
// Types and methods
6
9
impl UInt16 {
You can’t perform that action at this time.
0 commit comments