Changed dot and cross products by adding Return Value Optimization