MediaRational

struct in UnityEditor.Media

Description

Rational number useful for expressing fractions precisely.

Static Properties

Property Description
InvalidInvalid rational value.

Properties

Property Description
denominatorFraction denominator.
inverseThe inverse of the rational number.
isNegativeWhether the rational number is negative.
isValidWhether the rational number is valid.
isZeroWhether the rational number is zero.
numeratorFraction numerator.

Constructors

Constructor Description
MediaRationalConstructs a rational number. The version that omits the denominator sets it to 1.

Public Methods

Method Description
SetSets the numerator and denominator, performing normalization.

Operators

Operator Description
doubleReturns the rational value expressed as a floating point value.

Did you find this page useful? Please give it a rating: