<commit_before>import nimx.matrixes
import nimx.types

type Ray* = object
    origin*: Vector3
    direction*: Vector3

proc intersectWithPlane*(r: Ray, planeNormal: Vector3, dist: Coord, output: var Vector3): bool =
    var denom = dot(r.direction, planeNormal)
    if denom != 0:
        var t = -(dot(r.origin, planeNormal) + dist) / denom
        if t < 0:
            return false
        output = r.origin + r.direction * t
        echo output
        return true
    elif dot(planeNormal, r.origin) + dist == 0:
        output = r.origin
        return true
    else:
        return false

proc intersectWithPlane*(r: Ray, planeNormal, pointOnPlane: Vector3, output: var Vector3): bool =
    r.intersectWithPlane(planeNormal, -dot(planeNormal, pointOnPlane), output)<commit_msg>removed debug output<commit_after>import nimx.matrixes
import nimx.types

type Ray* = object
    origin*: Vector3
    direction*: Vector3

proc intersectWithPlane*(r: Ray, planeNormal: Vector3, dist: Coord, output: var Vector3): bool =
    var denom = dot(r.direction, planeNormal)
    if denom != 0:
        var t = -(dot(r.origin, planeNormal) + dist) / denom
        if t < 0:
            return false
        output = r.origin + r.direction * t
        return true
    elif dot(planeNormal, r.origin) + dist == 0:
        output = r.origin
        return true
    else:
        return false

proc intersectWithPlane*(r: Ray, planeNormal, pointOnPlane: Vector3, output: var Vector3): bool =
    r.intersectWithPlane(planeNormal, -dot(planeNormal, pointOnPlane), output)
{'fraction_non_alphanumeric': 0.1014771997430957, 'fraction_numerical': 0.011560693641618497, 'mean_word_length': 2.828009828009828, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5035661', 'n_tokens_mistral': 485, 'n_tokens_neox': 474, 'n_words': 147}