C# (CSharp) EncryptionAlgorithms Fraction - 17개의 예제가 발견되었습니다. 이것들은 오픈소스 프로젝트에서 추출된 C# (CSharp)의 EncryptionAlgorithms.Fraction에 대한 실세계 최고 등급의 예제들입니다. 예제들을 평가하여 예제의 품질 향상에 도움을 줄 수 있습니다.
Class name: Fraction Developed by: Syed Mehroz Alam Email: [email protected] URL: Programming Home "http://www.geocities.com/smehrozalam/" Version: 2.0 What's new in version 2.0: * Changed Numerator and Denominator from Int32(integer) to Int64(long) for increased range * renamed ConvertToString() to (overloaded) ToString() * added the capability of detecting/raising overflow exceptions * Fixed the bug that very small numbers e.g. 0.00000001 could not be converted to fraction * Other minor bugs fixed Properties: Numerator: Set/Get value for Numerator Denominator: Set/Get value for Numerator Value: Set an integer value for the fraction Constructors: no arguments: initializes fraction as 0/1 (Numerator, Denominator): initializes fraction with the given numerator and denominator values (integer): initializes fraction with the given integer value (long): initializes fraction with the given long value (double): initializes fraction with the given double value (string): initializes fraction with the given string value the string can be an in the form of and integer, double or fraction. e.g it can be like "123" or "123.321" or "123/456" Public Methods (Description is given with respective methods' definitions) (override) string ToString(Fraction) Fraction ToFraction(string) Fraction ToFraction(double) double ToDouble(Fraction) Fraction Duplicate() Fraction Inverse(integer) Fraction Inverse(Fraction) ReduceFraction(Fraction) Equals(object) GetHashCode() Private Methods (Description is given with respective methods' definitions) Initialize(Numerator, Denominator) Fraction Negate(Fraction) Fraction Add(Fraction1, Fraction2) Overloaded Operators (overloaded for Fractions, Integers and Doubles) Unary: - Binary: +,-,*,/ Relational and Logical Operators: ==,!=,<,>,<=,>= Overloaded user-defined conversions Implicit: From double/long/string to Fraction Explicit: From Fraction to double/string