<commit_before>#include "UnrealEnginePythonPrivatePCH.h"

static bool check_vector_args(PyObject *args, FVector &vec, bool &sweep, bool &teleport_physics) {
	PyObject *py_vec = nullptr;
	float x = 0, y = 0, z = 0;
	PyObject *py_sweep = nullptr;
	PyObject *py_teleport_physics = nullptr;

	if (!PyArg_ParseTuple(args, "O|OO", &py_vec, &py_sweep, &py_teleport_physics)) {
		PyErr_Clear();
		if (!PyArg_ParseTuple(args, "fff|OO", &x, &y, &z, &py_sweep, &py_teleport_physics)) {
			return false;
		}
	}

	if (py_vec) {
		ue_PyFVector *ue_py_vec = py_ue_is_fvector(py_vec);
		if (!ue_py_vec) {
			PyErr_SetString(PyExc_Exception, "argument is not a FVector");
			return false;
		}
		vec = ue_py_vec->vec;
	}
	else {
		vec.X = x;
		vec.Y = y;
		vec.Z = z;
	}

	sweep = (py_sweep && PyObject_IsTrue(py_sweep));
	teleport_physics = (py_teleport_physics && PyObject_IsTrue(py_teleport_physics));

	return true;
}

static bool check_rotation_args(PyObject *args, FQuat &quat, bool &sweep, bool &teleport_physics) {
	PyObject *py_rotation = nullptr;
	float roll = 0, pitch = 0, yaw = 0;
	PyObject *py_sweep = nullptr;
	PyObject *py_teleport_physics = nullptr;

	if (!PyArg_ParseTuple(args, "O|OO", &py_rotation, &py_sweep, &py_teleport_physics)) {
		PyErr_Clear();
		if (!PyArg_ParseTuple(args, "fff|OO", &roll, &pitch, &yaw, &py_sweep, &py_teleport_physics)) {
			return false;
		}
	}
<commit_msg>improved transform vector usage<commit_after>#include "UnrealEnginePythonPrivatePCH.h"

static bool check_vector_args(PyObject *args, FVector &vec, bool &sweep, bool &teleport_physics) {
	PyObject *py_vec = nullptr;
	float x = 0, y = 0, z = 0;
	PyObject *py_sweep = nullptr;
	PyObject *py_teleport_physics = nullptr;

	if (!PyArg_ParseTuple(args, "O|OO", &py_vec, &py_sweep, &py_teleport_physics)) {
		return false;
	}

	ue_PyFVector *ue_py_vec = py_ue_is_fvector(py_vec);
	if (!ue_py_vec) {
		if (!PyArg_ParseTuple(args, "fff|OO", &x, &y, &z, &py_sweep, &py_teleport_physics)) {
			return false;
		}
		vec.X = x;
		vec.Y = y;
		vec.Z = z;
	}
	else {
		vec = ue_py_vec->vec;
	}

	sweep = (py_sweep && PyObject_IsTrue(py_sweep));
	teleport_physics = (py_teleport_physics && PyObject_IsTrue(py_teleport_physics));

	return true;
}

static bool check_rotation_args(PyObject *args, FQuat &quat, bool &sweep, bool &teleport_physics) {
	PyObject *py_rotation = nullptr;
	float roll = 0, pitch = 0, yaw = 0;
	PyObject *py_sweep = nullptr;
	PyObject *py_teleport_physics = nullptr;

	if (!PyArg_ParseTuple(args, "O|OO", &py_rotation, &py_sweep, &py_teleport_physics)) {
		PyErr_Clear();
		if (!PyArg_ParseTuple(args, "fff|OO", &roll, &pitch, &yaw, &py_sweep, &py_teleport_physics)) {
			return false;
		}
	}

{'fraction_non_alphanumeric': 0.14030517305545218, 'fraction_numerical': 0.00446594715295869, 'mean_word_length': 5.165137614678899, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2979195', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1123, 'n_words': 234}