This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM https://www.mathscareers.org.uk/calculating-pi | |
setlocal | |
set /A "U=1<<27" | |
set I=1 | |
set /A P=3*U | |
set Q=0 | |
:start | |
set /A D=(I*2)*(I*2+1)*(I*2+2) | |
set /A T=4*U/D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
/// Sample source file indicating a wide variety of code elements that should work | |
/// with the "Open code in ILSpy" Visual Studio add-in feature. Each code element is | |
/// commented with the string generated by CodeElementXmlDocKeyProvider.GetKey and | |
/// used with the ILSpy /navigateTo command line option. | |
/// | |
/// Note that this code is not compiled or used in the project in any way, it is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Pool<T> where T : new() | |
{ | |
private readonly T[] mPool; | |
private int mNextAvailable; | |
public Pool(int capacity) | |
{ | |
mPool = new T[capacity]; | |
for (int i = 0; i < capacity; ++i) | |
{ |