<commit_before>package glimpse

import glimpse.test.GlimpseSpec

class ProjectionMatrixSpec : GlimpseSpec() {

	init {

		"Perspective projection" should {
			"be consistent with frustum projection" {
				println(perspectiveProjectionMatrix(90.degrees, 1f, 1f, 2f))
				println(frustumProjectionMatrix(-1f, 1f, -1f, 1f, 1f, 2f))
				perspectiveProjectionMatrix(90.degrees, 1f, 1f, 2f) shouldBeRoughly
						frustumProjectionMatrix(-1f, 1f, -1f, 1f, 1f, 2f)
			}
		}

	}
}<commit_msg>Added tests for orthographic matrix<commit_after>package glimpse

import glimpse.test.GlimpseSpec

class ProjectionMatrixSpec : GlimpseSpec() {

	init {

		"Perspective projection" should {
			"be consistent with frustum projection" {
				perspectiveProjectionMatrix(90.degrees, 1f, 1f, 2f) shouldBeRoughly
						frustumProjectionMatrix(-1f, 1f, -1f, 1f, 1f, 2f)
			}
		}

		"Orthographic projection" should {
			"be consistent with identity matrix" {
				orthographicProjectionMatrix(-1f, 1f, -1f, 1f, -1f, 1f) shouldBeRoughly Matrix.IDENTITY
			}
		}

	}
}
{'fraction_non_alphanumeric': 0.1037463976945245, 'fraction_numerical': 0.037463976945244955, 'mean_word_length': 4.236180904522613, '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': '524358', 'n_tokens_mistral': 452, 'n_tokens_neox': 377, 'n_words': 84}