コード例 #1
0
 public void DistanceToPoint(ScriptThread thread)
 {
     double vectorX = thread.GetDoubleParameter(0) - thread.GetDoubleParameter(2);
     double vectorY = thread.GetDoubleParameter(1) - thread.GetDoubleParameter(3);
     double distance = Math.Sqrt(vectorX * vectorX + vectorY * vectorY);
     thread.SetReturnValue(distance);
 }
コード例 #2
0
 public void Floor(ScriptThread thread)
 {
     thread.SetReturnValue(Math.Floor(thread.GetDoubleParameter(0)));
 }
コード例 #3
0
 public void Cosh(ScriptThread thread)
 {
     thread.SetReturnValue(Math.Cosh(thread.GetDoubleParameter(0)));
 }
コード例 #4
0
 public void Atan2(ScriptThread thread)
 {
     thread.SetReturnValue(Math.Atan2(thread.GetDoubleParameter(0), thread.GetDoubleParameter(1)));
 }
コード例 #5
0
 public void Round(ScriptThread thread)
 {
     thread.SetReturnValue(Math.Round(thread.GetDoubleParameter(0)));
 }
コード例 #6
0
 public void LogB(ScriptThread thread)
 {
     thread.SetReturnValue(Math.Log(thread.GetDoubleParameter(0), thread.GetDoubleParameter(1)));
 }
コード例 #7
0
ファイル: IO.cs プロジェクト: HampsterEater/FusionGameEngine
 public void StreamWriteH(ScriptThread thread)
 {
     ScriptStream stream = ((NativeObject)thread.GetObjectParameter(0)).Object as ScriptStream;
     if (stream == null)
     {
         DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called StreamWrite with an invalid object.", LogAlertLevel.Error);
         return;
     }
     stream.Writer.Write(thread.GetDoubleParameter(1));
 }