public void TestCot() { double a = 45; INode tree = new NodeFunction(new NodeValue(a), FunctionType.COTANGENT); Assert.AreEqual(0.61736, tree.GetResult(), 0.001, "Cotangent does not work."); }
public void setFunctionToExecute(NodeFunction function) { if (function != null) { _nodeFunction = function; } }
public void TestSin() { double a = 90; INode tree = new NodeFunction(new NodeValue(a), FunctionType.SINUS); Assert.AreEqual(0.8939966, tree.GetResult(), 0.001, "Sine does not work."); }
public void TestCos() { double a = 45; INode tree = new NodeFunction(new NodeValue(a), FunctionType.COSINUS); Assert.AreEqual(0.525321, tree.GetResult(), 0.001, "Cosine does not work."); }
public void TestTan() { double a = 45; INode tree = new NodeFunction(new NodeValue(a), FunctionType.TANGENT); Assert.AreEqual(1.619775, tree.GetResult(), 0.001, "Sine does not work."); }
private static void ApplyToAllNodes(TreeNodeCollection nodes, NodeFunction nodeFunction) { foreach (TreeNode node in nodes) { ApplyToAllNodes(node.Nodes, nodeFunction); nodeFunction(node); } }
public Task <byte[]> NodeQueryAsync(string addr, BlockParameter blockParameter = null) { var nodeFunction = new NodeFunction(); nodeFunction.Addr = addr; return(ContractHandler.QueryAsync <NodeFunction, byte[]>(nodeFunction, blockParameter)); }
public void onMessage(NodeFunction handler) { skype.MessageStatus += (message, status) => { if (status != TChatMessageStatus.cmsReceived) { return; } handler(new { chatId = message.Chat.Blob, chatName = message.ChatName, messageId = message.Guid, messageText = message.Body, messageType = message.Type }); }; }
public Task <byte[]> NodeQueryAsync(NodeFunction nodeFunction, BlockParameter blockParameter = null) { return(ContractHandler.QueryAsync <NodeFunction, byte[]>(nodeFunction, blockParameter)); }
/// <summary> /// スクリプト実行用公開エントリーポイントリストからエントリーポイントを削除します。 /// </summary> public void RemovePublicExecuteEntryPoint(NodeFunction func) { PublicExecuteEntryPointList.RemoveAll(s => s.function == func); UpdateButtonEnable(); }
/// <summary> /// スクリプト実行用公開エントリーポイントリストにエントリーポイントを追加します。 /// </summary> public void AddPublicExecuteEntryPoint(object owner, NodeFunction func) { PublicExecuteEntryPointList.Add(new EntryPoint(owner, func)); UpdateButtonEnable(); }
public EntryPoint(object owner, NodeFunction func) { this.owner = owner; this.function = func; }
public Node_Check_Condition(NodeFunction func) { m_function = func; }
public Node_Call_Delegate(NodeFunction func) { m_function = func; }
public void onAttachmentStatus(NodeFunction handler) { ((_ISkypeEvents_Event)skype).AttachmentStatus += status => handler(status); }
public override void visit(NodeFunction node) { nextNode = node.getNext(); } // Not sure if this is right..
public abstract void visit(NodeFunction node);