Skip to content

Instantly share code, notes, and snippets.

@Apo45ty
Apo45ty / Vec2Test
Last active August 29, 2015 14:22
Sparky Math Test Function
void Vec2Test() {
using namespace sparky;
using namespace math;
std::cout << "Printing Vector 2 test cases" << std::endl;
//test functions
Vec2 vector(1.0f, 2.0f);
std::cout << "\"" << vector << "\" expected: Vec2(1 , 2)" << std::endl;
vector.add(Vec2(5.0f, 4.0f));
std::cout << "\"" << vector << "\" expected: Vec2(6 , 6)" << std::endl;
vector.divide(Vec2(6.0f, 6.0f));
@Apo45ty
Apo45ty / gist:9963406
Last active August 29, 2015 13:58
myGradeCalc3_CROEM
public class myGradeCalc3{
public static void main(String[] args){
final int NUMBER_OF_STUDENTS = 10;
int[] grades = new int[NUMBER_OF_STUDENTS];
System.out.println("Welcome to the grade calculator, this program will can calculate the gradepoint average of "+NUMBER_OF_STUDENTS+" students.");
Scanner in = new Scanner(System.in);
//Enter the students grades
public class myGradeCalc2{
public static void main(String[] args){
System.out.println("Welcome to the grade calculator, this program will can calculate the gradepoint average of 4 students.");
Scanner in = new Scanner(System.in);
System.out.println("Please Enter Grade 1:");
int grade1 = in.nextInt();
public class myGradeCalc{
public static void main(String[] args){
System.out.println("Welcome to the grade calculator, this program will can calculate the gradepoint average of 3 students.");
Scanner in = new Scanner(System.in);
System.out.println("Please Enter Grade 1:");
int grade1 = in.nextInt();