<commit_before>#pragma once
#include "Core/Math/Vector.h"
#include "btBulletDynamicsCommon.h"

namespace Blueshift {
	namespace Physics {
		namespace Interop {
			template<typename T>
			btVector3 ToBullet(const Core::Math::Vector<3, T>& vec) {
				btVector3 bt_vec;
				bt_vec.m_floats[0] = static_cast<btScalar>(vec.data[0]);
				bt_vec.m_floats[1] = static_cast<btScalar>(vec.data[1]);
				bt_vec.m_floats[2] = static_cast<btScalar>(vec.data[2]);
				return bt_vec;
			}

			template<typename T>
			btVector4 ToBullet(const Core::Math::Vector<4, T>& vec) {
				btVector4 bt_vec;
				bt_vec.m_floats[0] = static_cast<btScalar>(vec.data[0]);
				bt_vec.m_floats[1] = static_cast<btScalar>(vec.data[1]);
				bt_vec.m_floats[2] = static_cast<btScalar>(vec.data[2]);
				bt_vec.m_floats[3] = static_cast<btScalar>(vec.data[3]);
				return bt_vec;
			}

			template<typename T>
			Core::Math::Vector<3, T> FromBullet(const btVector3& vec) {
				Core::Math::Vector<3, T> bs_vec;
				bs_vec.data[0] = static_cast<T>(vec.m_floats[0]);
				bs_vec.data[1] = static_cast<T>(vec.m_floats[1]);
				bs_vec.data[2] = static_cast<T>(vec.m_floats[2]);
				return bs_vec;
			}

			template<typename T>
			Core::Math::Vector<4, T> FromBullet(const btVector4& vec) {
				Core::Math::Vector<4, T> bs_vec;
				bs_vec.data[0] = static_cast<T>(vec.m_floats[0]);
				bs_vec.data[1] = static_cast<T>(vec.m_floats[1]);
				bs_vec.data[2] = static_cast<T>(vec.m_floats[2]);
				bs_vec.data[3] = static_cast<T>(vec.m_floats[3]);
				return bs_vec;
			}
		}
	}
}<commit_msg>Can now convert quaternions to Bullet form<commit_after>#pragma once
#include "Core/Math/Vector.h"
#include "btBulletDynamicsCommon.h"

namespace Blueshift {
	namespace Physics {
		namespace Interop {
			template<typename T>
			btVector3 ToBullet(const Core::Math::Vector<3, T>& vec) {
				btVector3 bt_vec;
				bt_vec.m_floats[0] = static_cast<btScalar>(vec.data[0]);
				bt_vec.m_floats[1] = static_cast<btScalar>(vec.data[1]);
				bt_vec.m_floats[2] = static_cast<btScalar>(vec.data[2]);
				return bt_vec;
			}

			template<typename T>
			btVector4 ToBullet(const Core::Math::Vector<4, T>& vec) {
				btVector4 bt_vec;
				bt_vec.m_floats[0] = static_cast<btScalar>(vec.data[0]);
				bt_vec.m_floats[1] = static_cast<btScalar>(vec.data[1]);
				bt_vec.m_floats[2] = static_cast<btScalar>(vec.data[2]);
				bt_vec.m_floats[3] = static_cast<btScalar>(vec.data[3]);
				return bt_vec;
			}

			template<typename T>
			Core::Math::Vector<3, T> FromBullet(const btVector3& vec) {
				Core::Math::Vector<3, T> bs_vec;
				bs_vec.data[0] = static_cast<T>(vec.m_floats[0]);
				bs_vec.data[1] = static_cast<T>(vec.m_floats[1]);
				bs_vec.data[2] = static_cast<T>(vec.m_floats[2]);
				return bs_vec;
			}

			template<typename T>
			Core::Math::Vector<4, T> FromBullet(const btVector4& vec) {
				Core::Math::Vector<4, T> bs_vec;
				bs_vec.data[0] = static_cast<T>(vec.m_floats[0]);
				bs_vec.data[1] = static_cast<T>(vec.m_floats[1]);
				bs_vec.data[2] = static_cast<T>(vec.m_floats[2]);
				bs_vec.data[3] = static_cast<T>(vec.m_floats[3]);
				return bs_vec;
			}

			template<typename T>
			btQuaternion ToBullet(const Core::Math::Quaternion<T>& q) {
				btQuaternion bt_quat(
					static_cast<btScalar>(q.data[0]),
					static_cast<btScalar>(q.data[1]),
					static_cast<btScalar>(q.data[2]),
					static_cast<btScalar>(q.data[3])
				);
				return bt_quat;
			}
		}
	}
}
{'fraction_non_alphanumeric': 0.1694915254237288, 'fraction_numerical': 0.024547048509643482, 'mean_word_length': 4.4506369426751595, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2640372', 'n_tokens_mistral': 1676, 'n_tokens_neox': 1410, 'n_words': 192}