Skip to content

Instantly share code, notes, and snippets.

View amuchand47's full-sized avatar
๐Ÿ˜
I may be slow to respond.

Mohammad Chand Alam amuchand47

๐Ÿ˜
I may be slow to respond.
View GitHub Profile
@amuchand47
amuchand47 / circles.cpp
Created February 28, 2017 04:40 — forked from linusthe3rd/circles.cpp
The two methods used to create circles in opengl
/*
* Function that handles the drawing of a circle using the triangle fan
* method. This will create a filled circle.
*
* Params:
* x (GLFloat) - the x position of the center point of the circle
* y (GLFloat) - the y position of the center point of the circle
* radius (GLFloat) - the radius that the painted circle will have
*/
void drawFilledCircle(GLfloat x, GLfloat y, GLfloat radius){
@amuchand47
amuchand47 / Brute Force Primality Test.c
Created August 25, 2016 13:06 — forked from CarterA/Brute Force Primality Test.c
Primality Testing and Factorization in C
int bruteForcePrimalityTest(long int n) {
for (long int i = 2; i < n; i++) {
if (n % i == 0) return 0;
}
return 1;
}