AngouriMath

Navigation

← Back to list of members

WithCodomain​(AngouriMath.​Core.​Domain)

 Method (no overloads)

Summary

Returns this node with the specified codomain,
keeping all the subnodes in the same domain they were in

Example

using System;
using AngouriMath.Core;
using static AngouriMath.MathS;

var expr = Sqrt(-1);
Console.WriteLine(expr);
Console.WriteLine(expr.Codomain);
Console.WriteLine(expr.Evaled);
Console.WriteLine("------------------------------------");
var newExpr = expr.WithCodomain(Domain.Real);
Console.WriteLine(newExpr);
Console.WriteLine(newExpr.Codomain);
Console.WriteLine(newExpr.Evaled);

Prints
sqrt(-1)
Complex
i
------------------------------------
sqrt(-1)
Real
NaN

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 1534 pages online