Version: 2019.3
LanguageEnglish
  • C#

MediaRational

struct in UnityEditor.Media

/

Implemented in:UnityEditor

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Rational number useful for expressing fractions precisely.

Static Properties

InvalidInvalid rational value.

Properties

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

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

Public Methods

SetSets the numerator and denominator, performing normalization.

Operators

Unknown operatorReturns the rational value expressed as a floating point value.