Result class

Represents a real number and its imaginary parts.

Implemented types

Constructors

Result({Rational? clean, Map<ImaginaryValue, num> dirtyParts = const {}, Modifier? modifier})
Creates the result.
Result.one()
The result of one.
Result.zero()
The result of zero.

Properties

clean Rational
The clean, real value.
latefinal
dirtyParts Map<ImaginaryValue, num>
The imaginary parts.
final
hashCode int
The hash code for this object.
no setteroverride
modifier Modifier?
The modifier, this is only kept to help the other operators.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

approximable() bool
Is the result approximable?
approximate([int? digits]) Rational
Approximate the result to a fraction.
compute(ComputeContext ctx) Result
Computes the value(s) stored in this object into a Result.
override
copyWith({Rational? clean, Map<ImaginaryValue, num>? dirtyParts, Modifier? modifier}) Result
Creates a copy of the result with edits.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator *(Result other) → dynamic
Multiplies two results.
operator +(Result other) → dynamic
Adds two results together.
operator -(Result other) → dynamic
Subtracts two results.
operator /(Result other) → dynamic
Divides two results.
operator ==(Object other) bool
The equality operator.
override
operator ^(Result other) → dynamic
Raises a result to a power.