2025-01-15 19:42:35 +01:00

855 lines
44 KiB
HTML

<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Point | openfl</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</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">openfl</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../index.html">openfl</a>
</li>
<li>
<a href="../modules/openfl.geom.html">geom</a>
</li>
<li>
<a href="openfl.geom.point.html">Point</a>
</li>
</ul>
<h1>Class Point</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The Point object represents a location in a two-dimensional coordinate
system, where <em>x</em> represents the horizontal axis and <em>y</em>
represents the vertical axis.</p>
</div>
<p>The following code creates a point at(0,0):</p>
<p>Methods and properties of the following classes use Point objects:</p>
<ul>
<li>BitmapData</li>
<li>DisplayObject</li>
<li>DisplayObjectContainer</li>
<li>DisplacementMapFilter</li>
<li>NativeWindow</li>
<li>Matrix</li>
<li>Rectangle</li>
</ul>
<p>You can use the <code>new Point()</code> constructor to create a Point
object.</p>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">Point</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section tsd-is-external">
<h3>Constructors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.point.html#constructor" class="tsd-kind-icon">constructor</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-external">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.point.html#length" class="tsd-kind-icon">length</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.point.html#x" class="tsd-kind-icon">x</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.point.html#y" class="tsd-kind-icon">y</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-external">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.point.html#add" class="tsd-kind-icon">add</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.point.html#clone" class="tsd-kind-icon">clone</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.point.html#copyfrom" class="tsd-kind-icon">copy<wbr>From</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.point.html#equals" class="tsd-kind-icon">equals</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.point.html#normalize" class="tsd-kind-icon">normalize</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.point.html#offset" class="tsd-kind-icon">offset</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.point.html#setto" class="tsd-kind-icon">set<wbr>To</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.point.html#subtract" class="tsd-kind-icon">subtract</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="openfl.geom.point.html#tostring" class="tsd-kind-icon">to<wbr>String</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="openfl.geom.point.html#distance" class="tsd-kind-icon">distance</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="openfl.geom.point.html#interpolate" class="tsd-kind-icon">interpolate</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="openfl.geom.point.html#polar" class="tsd-kind-icon">polar</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-external">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-external">
<a name="constructor" class="tsd-anchor"></a>
<h3>constructor</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">new <wbr>Point<span class="tsd-signature-symbol">(</span>x<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, y<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="openfl.geom.point.html" class="tsd-signature-type">Point</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L42">lib/openfl/geom/Point.d.ts:42</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Creates a new point. If you pass no parameters to this method, a point is
created at(0,0).</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> x: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The horizontal coordinate.</p>
</div>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> y: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The vertical coordinate.</p>
</div>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-external">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="length" class="tsd-anchor"></a>
<h3>length</h3>
<div class="tsd-signature tsd-kind-icon">length<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L32">lib/openfl/geom/Point.d.ts:32</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The length of the line segment from(0,0) to this point.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="x" class="tsd-anchor"></a>
<h3>x</h3>
<div class="tsd-signature tsd-kind-icon">x<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L37">lib/openfl/geom/Point.d.ts:37</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The horizontal coordinate of the point. The default value is 0.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="y" class="tsd-anchor"></a>
<h3>y</h3>
<div class="tsd-signature tsd-kind-icon">y<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L42">lib/openfl/geom/Point.d.ts:42</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The vertical coordinate of the point. The default value is 0.</p>
</div>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-external">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="add" class="tsd-anchor"></a>
<h3>add</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">add<span class="tsd-signature-symbol">(</span>v<span class="tsd-signature-symbol">: </span><a href="openfl.geom.point.html" class="tsd-signature-type">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L62">lib/openfl/geom/Point.d.ts:62</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Adds the coordinates of another point to the coordinates of this point to
create a new point.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>v: <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h5>
<div class="tsd-comment tsd-typography">
<p>The point to be added.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h4>
<p>The new point.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="clone" class="tsd-anchor"></a>
<h3>clone</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">clone<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L70">lib/openfl/geom/Point.d.ts:70</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Creates a copy of this Point object.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h4>
<p>The new Point object.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="copyfrom" class="tsd-anchor"></a>
<h3>copy<wbr>From</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">copy<wbr>From<span class="tsd-signature-symbol">(</span>sourcePoint<span class="tsd-signature-symbol">: </span><a href="openfl.geom.point.html" class="tsd-signature-type">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L73">lib/openfl/geom/Point.d.ts:73</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>sourcePoint: <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="equals" class="tsd-anchor"></a>
<h3>equals</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">equals<span class="tsd-signature-symbol">(</span>toCompare<span class="tsd-signature-symbol">: </span><a href="openfl.geom.point.html" class="tsd-signature-type">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L94">lib/openfl/geom/Point.d.ts:94</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Determines whether two points are equal. Two points are equal if they have
the same <em>x</em> and <em>y</em> values.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>toCompare: <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h5>
<div class="tsd-comment tsd-typography">
<p>The point to be compared.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>A value of <code>true</code> if the object is equal to this Point
object; <code>false</code> if it is not equal.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="normalize" class="tsd-anchor"></a>
<h3>normalize</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">normalize<span class="tsd-signature-symbol">(</span>thickness<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">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L128">lib/openfl/geom/Point.d.ts:128</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Scales the line segment between(0,0) and the current point to a set
length.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>thickness: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>The scaling value. For example, if the current point is
(0,5), and you normalize it to 1, the point returned is
at(0,1).</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
<p>The normalized point.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="offset" class="tsd-anchor"></a>
<h3>offset</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">offset<span class="tsd-signature-symbol">(</span>dx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, dy<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">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L141">lib/openfl/geom/Point.d.ts:141</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Offsets the Point object by the specified amount. The value of
<code>dx</code> is added to the original value of <em>x</em> to create the
new <em>x</em> value. The value of <code>dy</code> is added to the original
value of <em>y</em> to create the new <em>y</em> value.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>dx: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>The amount by which to offset the horizontal coordinate,
<em>x</em>.</p>
</div>
</li>
<li>
<h5>dy: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>The amount by which to offset the vertical coordinate, <em>y</em>.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="setto" class="tsd-anchor"></a>
<h3>set<wbr>To</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">set<wbr>To<span class="tsd-signature-symbol">(</span>xa<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, ya<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">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L155">lib/openfl/geom/Point.d.ts:155</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>xa: <span class="tsd-signature-type">number</span></h5>
</li>
<li>
<h5>ya: <span class="tsd-signature-type">number</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="subtract" class="tsd-anchor"></a>
<h3>subtract</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">subtract<span class="tsd-signature-symbol">(</span>v<span class="tsd-signature-symbol">: </span><a href="openfl.geom.point.html" class="tsd-signature-type">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L165">lib/openfl/geom/Point.d.ts:165</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Subtracts the coordinates of another point from the coordinates of this
point to create a new point.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>v: <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h5>
<div class="tsd-comment tsd-typography">
<p>The point to be subtracted.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h4>
<p>The new point.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="tostring" class="tsd-anchor"></a>
<h3>to<wbr>String</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">to<wbr>String<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L176">lib/openfl/geom/Point.d.ts:176</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns a string that contains the values of the <em>x</em> and <em>y</em>
coordinates. The string has the form <code>&quot;(x=_x_,
y=_y_)&quot;</code>, so calling the <code>toString()</code> method for a
point at 23,17 would return <code>&quot;(x=23, y=17)&quot;</code>.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<p>The string representation of the coordinates.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
<a name="distance" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> distance</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
<li class="tsd-signature tsd-kind-icon">distance<span class="tsd-signature-symbol">(</span>pt1<span class="tsd-signature-symbol">: </span><a href="openfl.geom.point.html" class="tsd-signature-type">Point</a>, pt2<span class="tsd-signature-symbol">: </span><a href="openfl.geom.point.html" class="tsd-signature-type">Point</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L83">lib/openfl/geom/Point.d.ts:83</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the distance between <code>pt1</code> and <code>pt2</code>.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>pt1: <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h5>
<div class="tsd-comment tsd-typography">
<p>The first point.</p>
</div>
</li>
<li>
<h5>pt2: <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h5>
<div class="tsd-comment tsd-typography">
<p>The second point.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
<p>The distance between the first and second points.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
<a name="interpolate" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> interpolate</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
<li class="tsd-signature tsd-kind-icon">interpolate<span class="tsd-signature-symbol">(</span>pt1<span class="tsd-signature-symbol">: </span><a href="openfl.geom.point.html" class="tsd-signature-type">Point</a>, pt2<span class="tsd-signature-symbol">: </span><a href="openfl.geom.point.html" class="tsd-signature-type">Point</a>, f<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="openfl.geom.point.html" class="tsd-signature-type">Point</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L116">lib/openfl/geom/Point.d.ts:116</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Determines a point between two specified points. The parameter
<code>f</code> determines where the new interpolated point is located
relative to the two end points specified by parameters <code>pt1</code>
and <code>pt2</code>. The closer the value of the parameter <code>f</code>
is to <code>1.0</code>, the closer the interpolated point is to the first
point(parameter <code>pt1</code>). The closer the value of the parameter
<code>f</code> is to 0, the closer the interpolated point is to the second
point(parameter <code>pt2</code>).</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>pt1: <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h5>
<div class="tsd-comment tsd-typography">
<p>The first point.</p>
</div>
</li>
<li>
<h5>pt2: <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h5>
<div class="tsd-comment tsd-typography">
<p>The second point.</p>
</div>
</li>
<li>
<h5>f: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>The level of interpolation between the two points. Indicates
where the new point will be, along the line between
<code>pt1</code> and <code>pt2</code>. If <code>f</code>=1,
<code>pt1</code> is returned; if <code>f</code>=0,
<code>pt2</code> is returned.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h4>
<p>The new, interpolated point.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
<a name="polar" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> polar</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
<li class="tsd-signature tsd-kind-icon">polar<span class="tsd-signature-symbol">(</span>len<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, angle<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="openfl.geom.point.html" class="tsd-signature-type">Point</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/openfl/openfl/blob/9921d3bf/lib/openfl/geom/Point.d.ts#L151">lib/openfl/geom/Point.d.ts:151</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Converts a pair of polar coordinates to a Cartesian point coordinate.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>len: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>The length coordinate of the polar pair.</p>
</div>
</li>
<li>
<h5>angle: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>The angle, in radians, of the polar pair.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="openfl.geom.point.html" class="tsd-signature-type">Point</a></h4>
<p>The Cartesian point.</p>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="label tsd-is-external">
<span>Externals</span>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.desktop.html">openfl.desktop</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.display.html">openfl.display</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.display3d.html">openfl.display3D</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.errors.html">openfl.errors</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.events.html">openfl.events</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.external.html">openfl.external</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.filters.html">openfl.filters</a>
</li>
<li class="current tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.geom.html">openfl.geom</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.media.html">openfl.media</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.net.html">openfl.net</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.profiler.html">openfl.profiler</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.sensors.html">openfl.sensors</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.system.html">openfl.system</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.text.html">openfl.text</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.ui.html">openfl.ui</a>
</li>
<li class=" tsd-kind-module tsd-parent-kind-module tsd-is-external">
<a href="../modules/openfl.utils.html">openfl.utils</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-enum tsd-parent-kind-module tsd-is-external">
<a href="../enums/openfl.geom.orientation3d.html" class="tsd-kind-icon">Orientation3D</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.colortransform.html" class="tsd-kind-icon">Color<wbr>Transform</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.matrix.html" class="tsd-kind-icon">Matrix</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.matrix3d.html" class="tsd-kind-icon">Matrix3D</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.perspectiveprojection.html" class="tsd-kind-icon">Perspective<wbr>Projection</a>
</li>
</ul>
<ul class="current">
<li class="current tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.point.html" class="tsd-kind-icon">Point</a>
<ul>
<li class=" tsd-kind-constructor tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.point.html#constructor" class="tsd-kind-icon">constructor</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.point.html#length" class="tsd-kind-icon">length</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.point.html#x" class="tsd-kind-icon">x</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.point.html#y" class="tsd-kind-icon">y</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.point.html#add" class="tsd-kind-icon">add</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.point.html#clone" class="tsd-kind-icon">clone</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.point.html#copyfrom" class="tsd-kind-icon">copy<wbr>From</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.point.html#equals" class="tsd-kind-icon">equals</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.point.html#normalize" class="tsd-kind-icon">normalize</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.point.html#offset" class="tsd-kind-icon">offset</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.point.html#setto" class="tsd-kind-icon">set<wbr>To</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.point.html#subtract" class="tsd-kind-icon">subtract</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="openfl.geom.point.html#tostring" class="tsd-kind-icon">to<wbr>String</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
<a href="openfl.geom.point.html#distance" class="tsd-kind-icon">distance</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
<a href="openfl.geom.point.html#interpolate" class="tsd-kind-icon">interpolate</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
<a href="openfl.geom.point.html#polar" class="tsd-kind-icon">polar</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.rectangle.html" class="tsd-kind-icon">Rectangle</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.transform.html" class="tsd-kind-icon">Transform</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.utils3d.html" class="tsd-kind-icon">Utils3D</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-external">
<a href="openfl.geom.vector3d.html" class="tsd-kind-icon">Vector3D</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
</body>
</html>