Code restyling.

This commit is contained in:
2020-02-29 18:03:33 +00:00
parent ad4bfdc0b5
commit 0bc3b5c1fe
7 changed files with 37 additions and 36 deletions

4
CHS.cs
View File

@@ -42,7 +42,7 @@ namespace Aaru.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;
}
}