-
Notifications
You must be signed in to change notification settings - Fork 0
Duration.GreatestCommonDivisor
Chanan edited this page Aug 15, 2020
·
1 revision
Duration.GreatestCommonDivisor Method
Namespace: CW.Soloist.CompositionService.MusicTheory
Assembly: CW.Soloist.CompositionService.dll
Utility static method for calculating GCD of two numbers with Euclids'es algorithm.
The Greatest Common Divisor (GCD) of the two given number a and b.
internal static int GreatestCommonDivisor(int a, int b)
{
if (b == 0)
return a;
return GreatestCommonDivisor(b, a % b);
}
© Chanan Welt - Soloist
- Home
- Getting Started
- Design
- Business Logical Layer (CW.Soloist.CompositionService)
- Duration Representation
- IDuration
- Duration
- Duration Representation
- Data Access Layer
- Presentation Layer
- Business Logical Layer (CW.Soloist.CompositionService)