Skip to content

Commit cb4fa4a

Browse files
author
Глеб Брыкин
authored
Add files via upload
1 parent 4e216bb commit cb4fa4a

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//***************************************************************************************************
2+
//* (C) ColorfulSoft corp., 2020 - 2021. All rights reserved.
3+
//* The code is available under the Apache-2.0 license. Read the License for details.
4+
//***************************************************************************************************
5+
6+
using System;
7+
8+
namespace System
9+
{
10+
11+
namespace IO
12+
{
13+
14+
public static class BinaryReaderExtension
15+
{
16+
17+
public static Half ReadHalf(this BinaryReader br)
18+
{
19+
return new Half{value = br.ReadUInt16()};
20+
}
21+
22+
}
23+
24+
}
25+
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//***************************************************************************************************
2+
//* (C) ColorfulSoft corp., 2020 - 2021. All rights reserved.
3+
//* The code is available under the Apache-2.0 license. Read the License for details.
4+
//***************************************************************************************************
5+
6+
using System;
7+
8+
namespace System
9+
{
10+
11+
namespace IO
12+
{
13+
14+
public static class BinaryWriterExtension
15+
{
16+
17+
public static void Write(this BinaryWriter bw, Half v)
18+
{
19+
bw.Write(v.value);
20+
}
21+
22+
}
23+
24+
}
25+
26+
}

0 commit comments

Comments
 (0)