Vector/apps/main.cpp

26 lines
688 B
C++
Raw Permalink Normal View History

2024-07-07 17:17:26 +02:00
#include <iostream>
#include "Vector/vector3.h"
int main(int argc, char **argv) {
std::cout << "Hello, world!" << std::endl;
Vector::Vector3 vec(1,2,3);
Vector::Vector3 vec2(2,1,3);
std::cout<<vec<<std::endl;
std::cout<<vec.len()<<std::endl;
vec*=2;
std::cout<<vec<<std::endl;
std::cout<<vec.len()<<std::endl;
vec/=2;
std::cout<<vec<<std::endl;
std::cout<<vec.len()<<std::endl;
std::cout<<vec.dot(vec)<<std::endl;
std::cout<<vec.cross(vec2)<<std::endl;
vec.norm();
std::cout<<vec<<std::endl;
std::cout<<vec.len()<<std::endl;
vec-=vec;
std::cout<<vec<<std::endl;
std::cout<<vec.len()<<std::endl;
return 0;
}