Fix formatting, spelling

This commit is contained in:
sam-astro 2022-05-25 15:20:17 -04:00 committed by GitHub
parent 7ce2d39b93
commit b321a36b7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,9 @@
using namespace std; using namespace std;
std::string ZSContents = R"( std::string ZSContents = R"(
////////////////////////////////////////////////////////////////////////////////
// ↓ DEFAULT BUILTIN ↓
// Default variables, can be overwritten // Default variables, can be overwritten
// if re-initialized or changed // if re-initialized or changed
float PI = 3.14159265358979323846264338 float PI = 3.14159265358979323846264338
@ -138,22 +141,23 @@ func GetKey(keyName)
return b return b
} }
// WIP
//func SplitThread(function) //func SplitThread(function)
//{ //{
// ZS.System.SplitThread(function) // ZS.System.SplitThread(function)
//} //}
//Function made by Kaputchino
//return the number of combinaison //////////////////////////////////////////////////////
// ↓ MADE BY KAPUTCHINO ↓
// Return the number of combinations
func Comb(n, r) func Comb(n, r)
{ {
return Perm(n ,r) / Fac(r) return Perm(n, r) / Fac(r)
} }
//return the factorial of a number // Return the factorial of a number
func Fac(x) func Fac(x)
{ {
int r = 1 int r = 1
@ -164,8 +168,8 @@ func Fac(x)
} }
return r return r
} }
//return exp(x) by using the taylor method, not extremly accurate
// Return exp(x) by using the taylor method, not extremly accurate
func TaylorExp(x) func TaylorExp(x)
{ {
float sum = 0 float sum = 0
@ -182,8 +186,7 @@ func TaylorExp(x)
return sum return sum
} }
//return the number of permutation // Return the number of permutations
func Perm(n, r) func Perm(n, r)
{ {
if n < 0 if n < 0