Quantity#

class ansys.aedt.core.generic.numbers.Quantity(expression, unit=None)#

Stores a number with its unit.

Parameters:
expressionfloat, str

Numerical value of the variable with or without units.

unitstr

Units for the value.

Methods

Quantity.arccos()

Square root of the value.

Quantity.arcsin()

Square root of the value.

Quantity.arctan2(other)

Quantity.as_integer_ratio(/)

Return integer ratio.

Quantity.conjugate(/)

Return self, the complex conjugate of any float.

Quantity.cos()

Square root of the value.

Quantity.fromhex(string, /)

Create a floating-point number from a hexadecimal string.

Quantity.hex(/)

Return a hexadecimal representation of a floating-point number.

Quantity.is_integer(/)

Return True if the float is an integer.

Quantity.log10()

Square root of the value.

Quantity.sin()

Square root of the value.

Quantity.sqrt()

Square root of the value.

Quantity.tan()

Quantity.to(unit)

Convert the actual number to new unit.

Attributes

Quantity.expression

Quantity.imag

the imaginary part of a complex number

Quantity.real

the real part of a complex number

Quantity.unit

Value unit.

Quantity.unit_system

Value unit system.

Quantity.value

Value number.