<commit_before>( ->
  ###*
  Create a new point with given x and y coordinates. If no arguments are given
  defaults to (0, 0).

  <code><pre>
  point = Point()

  p.x
  # => 0

  p.y
  # => 0

  point = Point(-2, 5)

  p.x
  # => -2

  p.y
  # => 5
  </pre></code>

  @name Point
  @param {Number} [x]
  @param {Number} [y]
  @constructor
  ###
  Point = (x, y) ->
    __proto__: Point::

    ###*
    The x coordinate of this point.
    @name x
    @fieldOf Point#
    ###
    x: x || 0
    ###*
    The y coordinate of this point.
    @name y
    @fieldOf Point#
    ###
    y: y || 0

  Point:: =
    ###*
    @name clamp
    @methodOf Point#
    @param {Number} n Maximum value for magnitude
    @returns {Point} A new point whose magnitude has been clamped to the given value.
    ###
    clamp: (n) ->
      @copy().clamp$()

    clamp$: (n) ->
      if @magnitude() > n
        @norm$(n)
      else
        this<commit_msg>Modified in browser at pixie.strd6.com<commit_after>( ->
  ###*
  Create a new point with given x and y coordinates. If no arguments are given
  defaults to (0, 0).

  <code><pre>
  point = Point()

  p.x
  # => 0

  p.y
  # => 0

  point = Point(-2, 5)

  p.x
  # => -2

  p.y
  # => 5
  </pre></code>

  @name Point
  @param {Number} [x]
  @param {Number} [y]
  @constructor
  ###
  Point = (x, y) ->
    __proto__: Point::

    ###*
    The x coordinate of this point.
    @name x
    @fieldOf Point#
    ###
    x: x || 0
    ###*
    The y coordinate of this point.
    @name y
    @fieldOf Point#
    ###
    y: y || 0

  Point:: =
    ###*
    @name clamp
    @methodOf Point#
    @param {Number} n Maximum value for magnitude.
    @returns {Point} A new point whose magnitude has been clamped to the given value.
    ###
    clamp: (n) ->
      @copy().clamp$()

    clamp$: (n) ->
      if @magnitude() > n
        @norm$(n)
      else
        this
{'fraction_non_alphanumeric': 0.1583686440677966, 'fraction_numerical': 0.011122881355932203, 'mean_word_length': 1.8448795180722892, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 29, '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': '573281', 'n_tokens_mistral': 728, 'n_tokens_neox': 686, 'n_words': 227}