---
title: "Rational class"
url: "https://reference.aspose.com/cad/python-net/aspose.cad.xmp.types.derived/rational/"
product: "Aspose.CAD for Python via .NET API References"
---


## Rational class

Represents XMP Rational.



**Inheritance:** [`Rational`](/cad/python-net/aspose.cad.xmp.types.derived/rational) → 
[`XmpTypeBase`](/cad/python-net/aspose.cad.xmp.types/xmptypebase)



The Rational type exposes the following members:

### Constructors
| Constructor | Description |
| :- | :- |
| [__init__](/cad/python-net/aspose.cad.xmp.types.derived/rational/__init__/#int-int) | Initializes a new instance of the [`Rational`](/cad/python-net/aspose.cad.xmp.types.derived/rational) class. |


### Properties
| Property | Description |
| :- | :- |
| [numerator](/cad/python-net/aspose.cad.xmp.types.derived/rational/numerator) | Gets the numerator. |
| [denominator](/cad/python-net/aspose.cad.xmp.types.derived/rational/denominator) | Gets or sets the denominator. |
| [float_value](/cad/python-net/aspose.cad.xmp.types.derived/rational/float_value) | Gets the float value. |


### Methods
| Method | Description |
| :- | :- |
| [get_xmp_representation](/cad/python-net/aspose.cad.xmp.types.derived/rational/get_xmp_representation/#) | Gets thestring contained value in XMP format. |



### See Also
* module [`aspose.cad.xmp.types.derived`](..)
* class [`Rational`](/cad/python-net/aspose.cad.xmp.types.derived/rational)
* class [`XmpTypeBase`](/cad/python-net/aspose.cad.xmp.types/xmptypebase)
