public void Double() { vm.EnsureSlots(1); vm.SetSlotNull(0); vm.SetSlotDouble(0, 200001); Assert.AreEqual(200001, vm.GetSlotDouble(0)); Assert.AreEqual(WrenType.Number, vm.GetSlotType(0)); }
public static void Sin(WrenVM vm) { vm.SetSlotDouble(0, Math.Sin(vm.GetSlotDouble(1))); }
public static void GetPi(WrenVM vm) { vm.SetSlotDouble(0, Math.PI); }
private void getY(WrenVM vm) { vm.SetSlotDouble(0, y); }
private void getX(WrenVM vm) { vm.SetSlotDouble(0, x); }
private static void getLength(WrenVM vm) { var vector = vm.GetSlotForeign <WrenVector>(1); vm.SetSlotDouble(0, Math.Sqrt((vector.x * vector.x) + (vector.y * vector.y))); }