Ceiling


Node Information
Returns the smallest integral value that is greater than or equal to the specified double-precision floating-point number.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Value IN Double ONE FALSE FALSE
Result OUT Double MULTIPLE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.Math
{
    [IsNode("Ceiling")]
    public class MathCeiling : Node
    {
        Port a = new Port(PortType.IN, typeof(double), AcceptsLinks.ONE, "Value");
        Port res = new Port(PortType.OUT, typeof(double), AcceptsLinks.MULTIPLE, "Result");
        public MathCeiling()
        {
            NodeType = NodeType.Function;
            ReturnType = typeof(double);
            a.Value = "0";
            res.Value = "0";
            this.Name = "Ceiling";
            this.AddPort(a);
            this.AddPort(res);
            Information = "Returns the smallest integral value that is greater than or equal to the specified double-precision floating-point number.";
        }
        public override string Code()
        {
            return "return Math.Ceiling(" + GetValue(a) + ");";
        }
    }
}