UNPKG

create-gojs-kit

Version:

A CLI for downloading GoJS samples, extensions, and docs

254 lines 96.1 kB
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><link rel="stylesheet" href="../../assets/css/style.css"/><link rel="preconnect" href="https://rsms.me/"/><link rel="stylesheet" href="https://rsms.me/inter/inter.css"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Point | GoJS API</title><meta name="description" content="Documentation for GoJS API"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script type="text/javascript">// formerly in api.js
  var hash = null;
  function changeHash() {
      var panels = document.getElementsByClassName("tsd-panel");
      for (let i = 0; i < panels.length; i++) {
          var p = panels[i];
          p.classList.remove("targeted");
      }
      hash = window.location.hash.slice(1);
      if (hash) {
          var elt = document.getElementById(hash);
          if (elt) elt.parentNode.classList.add("targeted");
      }
  }
  document.addEventListener("DOMContentLoaded", changeHash);
  window.addEventListener("hashchange", changeHash);</script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header><nav id="navTop" class="w-full h-[var(--topnav-h)] z-30 bg-[var(--color-background-secondary)] border-b border-b-[var(--color-accent)]"><div class="max-w-screen-xl mx-auto flex flex-wrap items-start justify-between px-4"><a class="!text-white bg-nwoods-primary font-bold !leading-[calc(var(--topnav-h)_-_1px)] my-0 px-2 text-4xl lg:text-5xl logo" href="../../index.html">GoJS</a><div class="relative"><button id="topnavButton" class="h-[calc(var(--topnav-h)_-_1px)] px-2 m-0 text-[var(--color-text)] bg-inherit shadow-none md:hidden hover:!bg-inherit hover:!text-nwoods-accent hover:!shadow-none" aria-label="Navigation"><svg class="h-7 w-7 block" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></button><div id="topnavList" class="hidden md:block"><div class="absolute right-0 z-30 flex flex-col items-end rounded border border-[var(--color-accent)] p-4 pl-12 shadow bg-[var(--color-background-secondary)] text-[var(--color-text)] font-semibold
                        md:flex-row md:space-x-4 md:items-start md:border-0 md:p-0 md:shadow-none md:!bg-inherit"><a href="../../learn/index.html">Learn</a><a href="../../samples/index.html">Samples</a><a href="../../intro/index.html">Intro</a><a class="active" href="../../api/index.html">API</a><a href="../../download.html">Download</a><a href="https://forum.nwoods.com/c/gojs/11" target="_blank" rel="noopener">Forum</a><a href="https://nwoods.com/contact.html" target="_blank" rel="noopener" id="contactBtn">Contact</a><a href="https://nwoods.com/sales/index.html" target="_blank" rel="noopener" id="buyBtn">Buy</a></div></div></div></div></nav><script>window.addEventListener("DOMContentLoaded", function () {
    // topnav
    var topButton = document.getElementById("topnavButton");
    var topnavList = document.getElementById("topnavList");
    if (topButton && topnavList) {
      topButton.addEventListener("click", function (e) {
        topnavList
          .classList
          .toggle("hidden");
        e.stopPropagation();
      });
      document.addEventListener("click", function (e) {
        // if the clicked element isn't the list, close the list
        if (!topnavList.classList.contains("hidden") && !e.target.closest("#topnavList")) {
          topButton.click();
        }
      });

      // set active <a> element
      // done via active tag below, always API
    }
  });</script><div class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><div id="tsd-search-help"><code class="!text-lg">/</code> to search</div><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">GoJS API</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><div class="flex w-full max-w-screen-xl mx-auto px-2 items-center justify-between"><div><ul class="tsd-breadcrumb"><li><a href="../index.html">GoJS API</a></li><li><a href="Point.html">Point</a></li></ul><h1 class="flex items-center">Class Point</h1></div><div class="text-xs"><b>GoJS</b>® Diagramming Components<br/>version 3.1.0<br/>by <a href="https://nwoods.com/">Northwoods Software®</a></div></div></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>A Point represents an x- and y-coordinate pair in two-dimensional space.</p>
<p>Use the static functions <a href="Point.html#parse" class="tsd-kind-method">Point.parse</a> and <a href="Point.html#stringify" class="tsd-kind-method">Point.stringify</a> to convert to and from
a standard string representation that is independent of the current locale.</p>
<p>When an instance of this class is the value of a property of a <a href="GraphObject.html" class="tsd-kind-class">GraphObject</a> class or <a href="Diagram.html" class="tsd-kind-class">Diagram</a>
or <a href="CommandHandler.html" class="tsd-kind-class">CommandHandler</a> or a <a href="Tool.html" class="tsd-kind-class">Tool</a> class, you should treat the object
as if it were frozen or read-only -- you cannot modify its properties.
This allows the property to return a value without allocating a new instance.
If you need to do your own calculations with the value, call <a href="Point.html#copy" class="tsd-kind-method">copy</a> to make
a new instance with the same values that you can modify.</p>
<p>Many methods modify the object&#39;s properties and then return a reference to &quot;this&quot; object.
The only instance method to allocate a new object is the <a href="Point.html#copy" class="tsd-kind-method">copy</a> method.
The static <a href="Point.html#parse" class="tsd-kind-method">Point.parse</a> method also allocates a new object.</p>
<p>The &quot;Debug&quot; implementation of this class is significantly slower than the &quot;Release&quot; implementation,
mostly due to additional error checking.</p>
<p>You cannot inherit from this class.</p>
</div></section><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="true" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="Point.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="Point.html#x" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>x</span></a>
<a href="Point.html#y" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>y</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="Point.html#add" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add</span></a>
<a href="Point.html#compareWithLineSegmentPoint" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compare<wbr/>With<wbr/>Line<wbr/>Segment<wbr/>Point</span></a>
<a href="Point.html#copy" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy</span></a>
<a href="Point.html#direction" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>direction</span></a>
<a href="Point.html#directionPoint" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>direction<wbr/>Point</span></a>
<a href="Point.html#distanceSquared" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>distance<wbr/>Squared</span></a>
<a href="Point.html#distanceSquaredPoint" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>distance<wbr/>Squared<wbr/>Point</span></a>
<a href="Point.html#equalTo" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>equal<wbr/>To</span></a>
<a href="Point.html#equals" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>equals</span></a>
<a href="Point.html#isReal" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Real</span></a>
<a href="Point.html#normalize" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>normalize</span></a>
<a href="Point.html#offset" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>offset</span></a>
<a href="Point.html#projectOntoLineSegment" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>project<wbr/>Onto<wbr/>Line<wbr/>Segment</span></a>
<a href="Point.html#projectOntoLineSegmentPoint" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>project<wbr/>Onto<wbr/>Line<wbr/>Segment<wbr/>Point</span></a>
<a href="Point.html#rotate" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>rotate</span></a>
<a href="Point.html#scale" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>scale</span></a>
<a href="Point.html#set" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set</span></a>
<a href="Point.html#setRectSpot" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Rect<wbr/>Spot</span></a>
<a href="Point.html#setSpot" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Spot</span></a>
<a href="Point.html#setTo" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>To</span></a>
<a href="Point.html#snapToGrid" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>snap<wbr/>To<wbr/>Grid</span></a>
<a href="Point.html#snapToGridPoint" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>snap<wbr/>To<wbr/>Grid<wbr/>Point</span></a>
<a href="Point.html#subtract" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>subtract</span></a>
<a href="Point.html#compareWithLineSegment" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><g id="subicon-S,#FF4DB8"><rect fill="var(--color-icon-background)" width="28" height="28" rx="14"></rect><path transform="translate(2, 2)" fill="none" stroke-width="1.5" stroke="var(--color-text)" d="M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5" stroke-linecap="round" stroke-linejoin="round"></path></g></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compare<wbr/>With<wbr/>Line<wbr/>Segment</span></a>
<a href="Point.html#direction-2" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>direction</span></a>
<a href="Point.html#distanceLineSegmentSquared" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>distance<wbr/>Line<wbr/>Segment<wbr/>Squared</span></a>
<a href="Point.html#distanceSquared-2" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>distance<wbr/>Squared</span></a>
<a href="Point.html#intersectingLineSegments" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>intersecting<wbr/>Line<wbr/>Segments</span></a>
<a href="Point.html#parse" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>parse</span></a>
<a href="Point.html#stringify" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>stringify</span></a>
<a href="Point.html#stringifyFixed" class="tsd-index-link"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>stringify<wbr/>Fixed</span></a>
</div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Constructors</h2><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_Point" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Point</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">y</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><a href="#constructor.new_Point" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The default constructor produces the Point(0,0).
This constructor may take either zero arguments or two arguments.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>The x value.</p>
</div></li><li><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">y</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>The y value.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Accessors</h2><section class="tsd-panel tsd-member"><a id="x" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>x</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#x" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the x value of the Point.</p>
</div></li></ul></section><section class="tsd-panel tsd-member"><a id="y" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>y</span><div class="membertype"><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></div><a href="#y" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets or sets the y value of the Point.</p>
</div></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Methods</h2><section class="tsd-panel tsd-member"><a id="add" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>add</span><a href="#add" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="add.add-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">p</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#add.add-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify this point so that is the sum of the current Point and the
x and y co-ordinates of the given Point.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">p</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5><div class="tsd-comment tsd-typography"><p>The Point to add to this Point.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this.</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="Point.html#offset" class="tsd-kind-method">offset</a></li>
<li><a href="Point.html#subtract" class="tsd-kind-method">subtract</a></li>
</ul>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="compareWithLineSegmentPoint" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>compare<wbr/>With<wbr/>Line<wbr/>Segment<wbr/>Point</span><a href="#compareWithLineSegmentPoint" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="compareWithLineSegmentPoint.compareWithLineSegmentPoint-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">compare<wbr/>With<wbr/>Line<wbr/>Segment<wbr/>Point</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">p</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a>, <span class="tsd-kind-parameter">q</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#compareWithLineSegmentPoint.compareWithLineSegmentPoint-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Compare this point with a finite line segment given by two Points.</p>
<p>This method compares this point with a finite line segment determined by the given two Points.
If the point is on the finite line segment, this returns zero.
If the point is on the left side of the segment, this returns a positive number.
If the point is on the right side of the segment, this returns a negative number.
If the point is on the infinitely extended line but not within the segment,
then this returns a positive number if the point is beyond the end of the segment when going from A1 to A2,
or this returns a negative number if the point comes before the segment&#39;s start at A1.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">p</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5><div class="tsd-comment tsd-typography"><p>the start of the finite line segment</p>
</div></li><li><h5><span class="tsd-kind-parameter">q</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5><div class="tsd-comment tsd-typography"><p>the end of the finite line segment</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>&lt;0 if this Point is on the right side of the line segment, or &gt;0 if this Point is on the left side, or zero if exactly on the finite line segment</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>2.2</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="copy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagVirtual">Virtual</code><span>copy</span><a href="#copy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="copy.copy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">copy</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><a href="#copy.copy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Create a copy of this Point, with the same values.</p>
</div><h4 class="tsd-returns-title">Returns <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="direction" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>direction</span><a href="#direction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="direction.direction-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">direction</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">px</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">py</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#direction.direction-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Compute the angle from this Point to a given (px,py) point.
However, if the point is the same as this Point, the direction is zero.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">px</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">py</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the angle, in degrees, of the line from this Point to the given point.</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="Point.html#directionPoint" class="tsd-kind-method">directionPoint</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="directionPoint" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>direction<wbr/>Point</span><a href="#directionPoint" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="directionPoint.directionPoint-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">direction<wbr/>Point</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">p</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#directionPoint.directionPoint-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Compute the angle from this Point to a given Point.
However, if the given Point is the same as this Point, the direction is zero.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">p</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5><div class="tsd-comment tsd-typography"><p>the other Point to which to measure the relative angle.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the angle, in degrees, of the line from this Point to the given point.</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="Point.html#direction-2" class="tsd-kind-method">direction</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="distanceSquared" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>distance<wbr/>Squared</span><a href="#distanceSquared" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="distanceSquared.distanceSquared-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">distance<wbr/>Squared</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">px</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">py</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#distanceSquared.distanceSquared-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the square of the distance from this point to a given point (px, py).</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">px</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">py</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the square of the euclidean distance.</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="Point.html#distanceSquaredPoint" class="tsd-kind-method">distanceSquaredPoint</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="distanceSquaredPoint" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>distance<wbr/>Squared<wbr/>Point</span><a href="#distanceSquaredPoint" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="distanceSquaredPoint.distanceSquaredPoint-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">distance<wbr/>Squared<wbr/>Point</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">p</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#distanceSquaredPoint.distanceSquaredPoint-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the square of the distance from this Point to a given Point.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">p</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5><div class="tsd-comment tsd-typography"><p>the other Point to measure to.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the square of the euclidean distance.</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="Point.html#distanceSquared-2" class="tsd-kind-method">distanceSquared</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="equalTo" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>equal<wbr/>To</span><a href="#equalTo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="equalTo.equalTo-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">equal<wbr/>To</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">y</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#equalTo.equalTo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Indicates whether the given point (x, y) is equal to this Point.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">y</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>True if the two Points have identical X and Y values,
false otherwise.</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="Point.html#equals" class="tsd-kind-method">equals</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="equals" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>equals</span><a href="#equals" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="equals.equals-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">equals</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">p</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#equals.equals-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Indicates whether the given Point is equal to this Point.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">p</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5><div class="tsd-comment tsd-typography"><p>The Point to compare to the current Point.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>True if the two Points have identical X and Y values,
false otherwise.</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="Point.html#equalTo" class="tsd-kind-method">equalTo</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="isReal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Real</span><a href="#isReal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="isReal.isReal-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Real</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isReal.isReal-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>True if this Point has X and Y values that are real numbers and not infinity.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="normalize" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>normalize</span><a href="#normalize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="normalize.normalize-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">normalize</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#normalize.normalize-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify this Point so that its X and Y values have been normalized to a unit length.
However, if this Point is the origin (zero, zero), its length remains zero.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="offset" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>offset</span><a href="#offset" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="offset.offset-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">offset</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">dx</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">dy</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#offset.offset-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify this point by shifting its values with the given DX and DY offsets.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">dx</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">dy</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this.</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="Point.html#add" class="tsd-kind-method">add</a></li>
<li><a href="Point.html#subtract" class="tsd-kind-method">subtract</a></li>
</ul>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="projectOntoLineSegment" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>project<wbr/>Onto<wbr/>Line<wbr/>Segment</span><a href="#projectOntoLineSegment" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="projectOntoLineSegment.projectOntoLineSegment-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">project<wbr/>Onto<wbr/>Line<wbr/>Segment</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">px</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">py</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">qx</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">qy</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#projectOntoLineSegment.projectOntoLineSegment-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify this point to be the closest point to this point that is on a finite line segment.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">px</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>one end of the finite line segment</p>
</div></li><li><h5><span class="tsd-kind-parameter">py</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>one end of the finite line segment</p>
</div></li><li><h5><span class="tsd-kind-parameter">qx</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>the other end of the finite line segment</p>
</div></li><li><h5><span class="tsd-kind-parameter">qy</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>the other end of the finite line segment</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this modified Point</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="projectOntoLineSegmentPoint" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>project<wbr/>Onto<wbr/>Line<wbr/>Segment<wbr/>Point</span><a href="#projectOntoLineSegmentPoint" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="projectOntoLineSegmentPoint.projectOntoLineSegmentPoint-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">project<wbr/>Onto<wbr/>Line<wbr/>Segment<wbr/>Point</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">p</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a>, <span class="tsd-kind-parameter">q</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#projectOntoLineSegmentPoint.projectOntoLineSegmentPoint-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify this point to be the closest point to this point that is on a finite line segment.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">p</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5><div class="tsd-comment tsd-typography"><p>one end of the finite line segment</p>
</div></li><li><h5><span class="tsd-kind-parameter">q</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5><div class="tsd-comment tsd-typography"><p>the other end of the finite line segment</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this modified Point</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="rotate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>rotate</span><a href="#rotate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="rotate.rotate-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">rotate</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">angle</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#rotate.rotate-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify this Point so that has been rotated about the origin by the given angle.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">angle</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>an angle in degrees.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="scale" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>scale</span><a href="#scale" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="scale.scale-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">scale</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sx</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">sy</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#scale.scale-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify this Point so that its X and Y values have been scaled by given factors along the X and Y axes.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">sx</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">sy</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="set" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set</span><a href="#set" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="set.set-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">p</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#set.set-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify this Point so that its X and Y values are the same as the given Point.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">p</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5><div class="tsd-comment tsd-typography"><p>the given Point.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="setRectSpot" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Rect<wbr/>Spot</span><a href="#setRectSpot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="setRectSpot.setRectSpot-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Rect<wbr/>Spot</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">r</span><span class="tsd-signature-symbol">: </span><a href="Rect.html" class="tsd-signature-type tsd-kind-class">Rect</a>, <span class="tsd-kind-parameter">spot</span><span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type tsd-kind-class">Spot</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#setRectSpot.setRectSpot-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify this Point so that its X and Y values correspond to a particular <a href="Spot.html" class="tsd-kind-class">Spot</a>
in a given Rect.</p>
<p>The result is meaningless if <a href="Spot.html#isNoSpot" class="tsd-kind-method">Spot.isNoSpot</a> is true for the given Spot.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">r</span>: <a href="Rect.html" class="tsd-signature-type tsd-kind-class">Rect</a></h5><div class="tsd-comment tsd-typography"><p>the Rect for which we are finding the point.</p>
</div></li><li><h5><span class="tsd-kind-parameter">spot</span>: <a href="Spot.html" class="tsd-signature-type tsd-kind-class">Spot</a></h5><div class="tsd-comment tsd-typography"><p>the Spot; <a href="Spot.html#isSpot" class="tsd-kind-method">Spot.isSpot</a> must be true for this Spot.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this.</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="Point.html#setSpot" class="tsd-kind-method">setSpot</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="setSpot" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Spot</span><a href="#setSpot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="setSpot.setSpot-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Spot</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">y</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">w</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">h</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">spot</span><span class="tsd-signature-symbol">: </span><a href="Spot.html" class="tsd-signature-type tsd-kind-class">Spot</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#setSpot.setSpot-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify this Point so that its X and Y values correspond to a particular <a href="Spot.html" class="tsd-kind-class">Spot</a>
in a given rectangle.</p>
<p>The result is meaningless if <a href="Spot.html#isNoSpot" class="tsd-kind-method">Spot.isNoSpot</a> is true for the given Spot.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>The X coordinate of the Rect for which we are finding the point.</p>
</div></li><li><h5><span class="tsd-kind-parameter">y</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>The Y coordinate of the Rect for which we are finding the point.</p>
</div></li><li><h5><span class="tsd-kind-parameter">w</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>The Width of the Rect for which we are finding the point.</p>
</div></li><li><h5><span class="tsd-kind-parameter">h</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>The Height of the Rect for which we are finding the point.</p>
</div></li><li><h5><span class="tsd-kind-parameter">spot</span>: <a href="Spot.html" class="tsd-signature-type tsd-kind-class">Spot</a></h5><div class="tsd-comment tsd-typography"><p>the Spot; <a href="Spot.html#isSpot" class="tsd-kind-method">Spot.isSpot</a> must be true for this Spot.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this the point of the spot in the rectangle.</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><p><a href="Point.html#setRectSpot" class="tsd-kind-method">setRectSpot</a></p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="setTo" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>To</span><a href="#setTo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="setTo.setTo-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>To</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">x</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">y</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#setTo.setTo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify this Point with new X and Y values.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">x</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">y</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="snapToGrid" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>snap<wbr/>To<wbr/>Grid</span><a href="#snapToGrid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="snapToGrid.snapToGrid-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">snap<wbr/>To<wbr/>Grid</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">originx</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">originy</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">cellwidth</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">cellheight</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#snapToGrid.snapToGrid-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify this point to be at the nearest point on an infinite grid,
given the grid&#39;s origin and size of each grid cell.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">originx</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>the top-left point of one of the grid cells</p>
</div></li><li><h5><span class="tsd-kind-parameter">originy</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>the top-left point of one of the grid cells</p>
</div></li><li><h5><span class="tsd-kind-parameter">cellwidth</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>the size of each grid cell -- must be a real number larger than zero</p>
</div></li><li><h5><span class="tsd-kind-parameter">cellheight</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>the size of each grid cell -- must be a real number larger than zero</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this modified Point</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="snapToGridPoint" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>snap<wbr/>To<wbr/>Grid<wbr/>Point</span><a href="#snapToGridPoint" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="snapToGridPoint.snapToGridPoint-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">snap<wbr/>To<wbr/>Grid<wbr/>Point</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">origin</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a>, <span class="tsd-kind-parameter">cellsize</span><span class="tsd-signature-symbol">: </span><a href="Size.html" class="tsd-signature-type tsd-kind-class">Size</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#snapToGridPoint.snapToGridPoint-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify this point to be at the nearest point on an infinite grid,
given the grid&#39;s origin and size of each grid cell.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">origin</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5><div class="tsd-comment tsd-typography"><p>the top-left point of one of the grid cells</p>
</div></li><li><h5><span class="tsd-kind-parameter">cellsize</span>: <a href="Size.html" class="tsd-signature-type tsd-kind-class">Size</a></h5><div class="tsd-comment tsd-typography"><p>the size of each grid cell</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this modified Point</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="subtract" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>subtract</span><a href="#subtract" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="subtract.subtract-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">subtract</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">p</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#subtract.subtract-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Modify this point so that is the difference of this Point and the
x and y co-ordinates of the given Point.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">p</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5><div class="tsd-comment tsd-typography"><p>The Point to subtract from the current Point.</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><p>this.</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">see</code><ul>
<li><a href="Point.html#offset" class="tsd-kind-method">offset</a></li>
<li><a href="Point.html#add" class="tsd-kind-method">add</a></li>
</ul>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="compareWithLineSegment" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>compare<wbr/>With<wbr/>Line<wbr/>Segment</span><a href="#compareWithLineSegment" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="compareWithLineSegment.compareWithLineSegment-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">compare<wbr/>With<wbr/>Line<wbr/>Segment</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">a1x</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">a1y</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">a2x</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">a2y</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">px</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">py</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#compareWithLineSegment.compareWithLineSegment-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function compares a point with a finite line segment.</p>
<p>If the point is on the finite line segment, this returns zero.
If the point is on the left side of the segment, this returns a positive number.
If the point is on the right side of the segment, this returns a negative number.
If the point is on the infinitely extended line but not within the segment,
then this returns a positive number if the point is beyond the end of the segment when going from A1 to A2,
or this returns a negative number if the point comes before the segment&#39;s start at A1.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">a1x</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">a1y</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">a2x</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">a2y</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">px</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">py</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>&lt;0 if on the right side, or &gt;0 if on the left side, or zero if exactly on the finite line segment</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>2.2</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="direction-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>direction</span><a href="#direction-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="direction-2.direction-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">direction</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">px</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">py</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">qx</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">qy</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#direction-2.direction-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function returns the angle in degrees of the line from point P to point Q.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">px</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">py</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">qx</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">qy</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="distanceLineSegmentSquared" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>distance<wbr/>Line<wbr/>Segment<wbr/>Squared</span><a href="#distanceLineSegmentSquared" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="distanceLineSegmentSquared.distanceLineSegmentSquared-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">distance<wbr/>Line<wbr/>Segment<wbr/>Squared</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">px</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">py</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">ax</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">ay</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">bx</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">by</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#distanceLineSegmentSquared.distanceLineSegmentSquared-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function returns the square of the distance from the point P
to the finite line segment from point A to point B.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">px</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">py</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">ax</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">ay</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">bx</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">by</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the euclidean distance.</p>
</li></ul></section><section class="tsd-panel tsd-member"><a id="distanceSquared-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>distance<wbr/>Squared</span><a href="#distanceSquared-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="distanceSquared-2.distanceSquared-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">distance<wbr/>Squared</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">px</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">py</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">qx</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">qy</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#distanceSquared-2.distanceSquared-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function returns the square of the distance from the point P to the point Q.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">px</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">py</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">qx</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">qy</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="intersectingLineSegments" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>intersecting<wbr/>Line<wbr/>Segments</span><a href="#intersectingLineSegments" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="intersectingLineSegments.intersectingLineSegments-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">intersecting<wbr/>Line<wbr/>Segments</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">a1x</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">a1y</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">a2x</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">a2y</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">b1x</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">b1y</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">b2x</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, <span class="tsd-kind-parameter">b2y</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#intersectingLineSegments.intersectingLineSegments-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function is true if two finite straight line segments intersect each other.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">a1x</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">a1y</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">a2x</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">a2y</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">b1x</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">b1y</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">b2x</span>: <span class="tsd-signature-type">number</span></h5></li><li><h5><span class="tsd-kind-parameter">b2y</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>True if the two given finite line segments intersect with each other, false otherwise.</p>
<div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>2.2</p>
</div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="parse" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>parse</span><a href="#parse" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="parse.parse-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">parse</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">str</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><a href="#parse.parse-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function can be used to read in a <a href="Point.html" class="tsd-kind-class">Point</a> from a string that was produced by <a href="Point.html#stringify" class="tsd-kind-method">Point.stringify</a>.</p>
<p><code>go.Point.parse(&quot;1 2&quot;)</code> produces the Point <code>new go.Point(1, 2)</code>.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">str</span>: <span class="tsd-signature-type">string</span></h5></li></ul></div><h4 class="tsd-returns-title">Returns <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="stringify" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>stringify</span><a href="#stringify" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="stringify.stringify-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">stringify</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#stringify.stringify-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function can be used to write out a <a href="Point.html" class="tsd-kind-class">Point</a> as a string that can be read by <a href="Point.html#parse" class="tsd-kind-method">Point.parse</a>.</p>
<p><code>go.Point.stringify(new go.Point(1, 2))</code> produces the string &quot;1 2&quot;.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">val</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section><section class="tsd-panel tsd-member"><a id="stringifyFixed" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>stringify<wbr/>Fixed</span><a href="#stringifyFixed" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="stringifyFixed.stringifyFixed-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">stringify<wbr/>Fixed</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">digits</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><a href="#stringifyFixed.stringifyFixed-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This static function returns a function that can be used as a back converter for a Binding
to write out a Point&#39;s values as numbers with a fixed number of digits after the decimal point.</p>
<p>This is useful for limiting the size of JSON output and making it more legible.
It might also be useful for regression testing.</p>
<p>Example:</p>
<pre><code class="language-js"><span class="hl-2">  </span><span class="hl-1">new</span><span class="hl-2"> </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-5">Binding</span><span class="hl-2">(</span><span class="hl-6">&quot;location&quot;</span><span class="hl-2">, </span><span class="hl-6">&quot;loc&quot;</span><span class="hl-2">, </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Point</span><span class="hl-2">.</span><span class="hl-4">parse</span><span class="hl-2">, </span><span class="hl-4">go</span><span class="hl-2">.</span><span class="hl-4">Point</span><span class="hl-2">.</span><span class="hl-5">stringifyFixed</span><span class="hl-2">(</span><span class="hl-7">2</span><span class="hl-2">))</span>
</code><button>Copy</button></pre>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">digits</span>: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>must be a non-negative integer</p>
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span></h4><p>a function that converts a Point to a string without so many decimals</p>
<ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature" id="stringifyFixed.stringifyFixed-1.__type.__type-1"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><h5><span class="tsd-kind-parameter">val</span>: <a href="Point.html" class="tsd-signature-type tsd-kind-class">Point</a></h5></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></li></ul><div class="tsd-comment-tags tsd-typography"><div class="flex items-center"><code class="tsd-tag">since</code><p>3.0</p>
</div></div></li></ul></section></section></div><div class="col-sidebar"><div class="page-menu"><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><ul><li><a href="#constructor"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></li><li><a href="#x"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>x</span></a></li><li><a href="#y"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>y</span></a></li><li><a href="#add"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add</span></a></li><li><a href="#compareWithLineSegmentPoint"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compare<wbr/>With<wbr/>Line<wbr/>Segment<wbr/>Point</span></a></li><li><a href="#copy"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy</span></a></li><li><a href="#direction"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>direction</span></a></li><li><a href="#directionPoint"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>direction<wbr/>Point</span></a></li><li><a href="#distanceSquared"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>distance<wbr/>Squared</span></a></li><li><a href="#distanceSquaredPoint"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>distance<wbr/>Squared<wbr/>Point</span></a></li><li><a href="#equalTo"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>equal<wbr/>To</span></a></li><li><a href="#equals"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>equals</span></a></li><li><a href="#isReal"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Real</span></a></li><li><a href="#normalize"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>normalize</span></a></li><li><a href="#offset"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>offset</span></a></li><li><a href="#projectOntoLineSegment"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>project<wbr/>Onto<wbr/>Line<wbr/>Segment</span></a></li><li><a href="#projectOntoLineSegmentPoint"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>project<wbr/>Onto<wbr/>Line<wbr/>Segment<wbr/>Point</span></a></li><li><a href="#rotate"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>rotate</span></a></li><li><a href="#scale"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>scale</span></a></li><li><a href="#set"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set</span></a></li><li><a href="#setRectSpot"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Rect<wbr/>Spot</span></a></li><li><a href="#setSpot"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Spot</span></a></li><li><a href="#setTo"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>To</span></a></li><li><a href="#snapToGrid"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>snap<wbr/>To<wbr/>Grid</span></a></li><li><a href="#snapToGridPoint"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>snap<wbr/>To<wbr/>Grid<wbr/>Point</span></a></li><li><a href="#subtract"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>subtract</span></a></li><li><a href="#compareWithLineSegment"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compare<wbr/>With<wbr/>Line<wbr/>Segment</span></a></li><li><a href="#direction-2"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>direction</span></a></li><li><a href="#distanceLineSegmentSquared"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>distance<wbr/>Line<wbr/>Segment<wbr/>Squared</span></a></li><li><a href="#distanceSquared-2"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>distance<wbr/>Squared</span></a></li><li><a href="#intersectingLineSegments"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>intersecting<wbr/>Line<wbr/>Segments</span></a></li><li><a href="#parse"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>parse</span></a></li><li><a href="#stringify"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>stringify</span></a></li><li><a href="#stringifyFixed"><svg class="static tsd-subicon" viewBox="0 0 28 28"><use href="#subicon-S,#FF4DB8"></use></svg><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>stringify<wbr/>Fixed</span></a></li></ul></div></details><div class="tsd-navigation settings"><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">System</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>GoJS API</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><div class="tsd w-full max-w-screen-xl mx-auto px-2"><div class="bottom-copyright">Copyright © 1998-2025 by Northwoods Software Corporation.</div></div><div class="overlay"></div><script async src="https://www.googletagmanager.com/gtag/js?id=G-S5QK8VSK84"></script><script>window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-S5QK8VSK84');
var getOutboundLink = function(url, label) {
  gtag('event', 'click', {
  'event_category': 'outbound',
  'event_label': label,
  'transport_type': 'beacon'
  });
}

document.getElementById("contactBtn").addEventListener("click", function() {
  getOutboundLink('https://nwoods.com/contact.html', 'contact');
});
document.getElementById("buyBtn").addEventListener("click", function() {
  getOutboundLink('https://nwoods.com/sales/index.html', 'buy');
});</script></body></html>