<commit_before>package timetrace.shape

import timetrace.math.Vector4
import timetrace.Ray
import timetrace.RayHit
import timetrace.math.Vector3

/**
 * Set of points x, satisfying x dot normal == offset
 */
class Plane(val normal: Vector3.Normalized, val offset: Double) extends Shape {

  override def toString = s"Plane($normal, $offset)"

  def intersect(ray: Ray): Option[ShapeHit] = {
    val t = (offset - (ray.start.truncateTo3 dot normal)) / (ray.direction dot normal)

    if (t > 0 && java.lang.Double.isFinite(t))
      Some(new ShapeHit(t, normal))
    else
      None
  }

}<commit_msg>Tweak for Scala 2.11<commit_after>package timetrace.shape

import timetrace.math.Vector4
import timetrace.Ray
import timetrace.RayHit
import timetrace.math.Vector3

/**
 * Set of points x, satisfying x dot normal == offset
 */
class Plane(val normal: Vector3.Normalized, val offset: Double) extends Shape {

  override def toString = s"Plane($normal, $offset)"

  def intersect(ray: Ray): Option[ShapeHit] = {
    val t = (offset - (ray.start.truncateTo3 dot normal)) / (ray.direction dot normal)

    if (t > 0.0 && t < Double.PositiveInfinity)
      Some(new ShapeHit(t, normal))
    else
      None
  }

}
{'fraction_non_alphanumeric': 0.11672185430463576, 'fraction_numerical': 0.011589403973509934, 'mean_word_length': 3.72265625, 'pattern_counts': {'":': 0, '<': 4, '<?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': '411107', 'n_tokens_mistral': 413, 'n_tokens_neox': 394, 'n_words': 114}