Code reformat.

This commit is contained in:
2019-11-25 00:54:39 +00:00
parent 6937468728
commit a7d7c673a1
13 changed files with 356 additions and 392 deletions

9
CHS.cs
View File

@@ -34,9 +34,7 @@ namespace DiscImageChef.Helpers
{
public static class CHS
{
/// <summary>
/// Converts a CHS position to a LBA one
/// </summary>
/// <summary>Converts a CHS position to a LBA one</summary>
/// <param name="cyl">Cylinder</param>
/// <param name="head">Head</param>
/// <param name="sector">Sector</param>
@@ -44,8 +42,7 @@ namespace DiscImageChef.Helpers
/// <param name="maxSector">Number of sectors per track</param>
/// <returns></returns>
public static uint ToLBA(uint cyl, uint head, uint sector, uint maxHead, uint maxSector) =>
maxHead == 0 || maxSector == 0
? (cyl * 16 + head) * 63 + sector - 1
: (cyl * maxHead + head) * maxSector + sector - 1;
maxHead == 0 || maxSector == 0 ? (cyl * 16 + head) * 63 + sector - 1
: (cyl * maxHead + head) * maxSector + sector - 1;
}
}