<commit_before>/******************************************************************************\
Angle support
\******************************************************************************/

// wow... this is basically just vector-support, but renamed angle-support :P
// pitch, yaw, roll
registerType("angle", "a", { 0, 0, 0 },
	function(self, input) return { input.p, input.y, input.r } end,
	function(self, output) return Angle(output[1], output[2], output[3]) end,
	function(retval)
		if !istable(retval) then error("Return value is not a table, but a "..type(retval).."!",0) end
		if #retval ~= 3 then error("Return value does not have exactly 3 entries!",0) end
	end,
	function(v)
		return !istable(v) or #v ~= 3
	end
)
<commit_msg>Fixed reading from unwired wirelink<commit_after>/******************************************************************************\
Angle support
\******************************************************************************/

registerType("angle", "a", { 0, 0, 0 },
	function(self, input) return { input.p or input[1], input.y or input[2], input.r or input[3] } end,
	function(self, output) return Angle(output[1], output[2], output[3]) end,
	function(retval)
		if !istable(retval) then error("Return value is not a table, but a "..type(retval).."!",0) end
		if #retval ~= 3 then error("Return value does not have exactly 3 entries!",0) end
	end,
	function(v)
		return !istable(v) or #v ~= 3
	end
)

{'fraction_non_alphanumeric': 0.34561891515994436, 'fraction_numerical': 0.017385257301808066, 'mean_word_length': 5.755868544600939, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2552712', 'n_tokens_mistral': 436, 'n_tokens_neox': 406, 'n_words': 137}