UNPKG

jsdk-offical

Version:

JSDK is the most comprehensive TypeScript framework, like JDK.

478 lines 22.5 kB
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Radians | JSDK 2.7.0 API</title> <meta name="description" content="Documentation for JSDK 2.7.0 API"> <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.json" 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">JSDK 2.7.0 API</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="../globals.html">Globals</a> </li> <li> <a href="../modules/js.html">JS</a> </li> <li> <a href="../modules/js.math.html">math</a> </li> <li> <a href="js.math.radians.html">Radians</a> </li> </ul> <h1>Class Radians</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>Radian tool</p> </div> </div> </section> <section class="tsd-panel tsd-hierarchy"> <h3>Hierarchy</h3> <ul class="tsd-hierarchy"> <li> <span class="target">Radians</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 "> <h3>Properties</h3> <ul class="tsd-index-list"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="js.math.radians.html#east" class="tsd-kind-icon">EAST</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="js.math.radians.html#north" class="tsd-kind-icon">NORTH</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="js.math.radians.html#one_cycle" class="tsd-kind-icon">ONE_<wbr>CYCLE</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="js.math.radians.html#south" class="tsd-kind-icon">SOUTH</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="js.math.radians.html#west" class="tsd-kind-icon">WEST</a></li> </ul> </section> <section class="tsd-index-section "> <h3>Methods</h3> <ul class="tsd-index-list"> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="js.math.radians.html#deg2rad" class="tsd-kind-icon">deg2rad</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="js.math.radians.html#equal" class="tsd-kind-icon">equal</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="js.math.radians.html#positive" class="tsd-kind-icon">positive</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="js.math.radians.html#rad2deg" class="tsd-kind-icon">rad2deg</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="js.math.radians.html#reverse" class="tsd-kind-icon">reverse</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Properties</h2> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a name="east" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> EAST</h3> <div class="tsd-signature tsd-kind-icon">EAST<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div> <aside class="tsd-sources"> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a name="north" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> NORTH</h3> <div class="tsd-signature tsd-kind-icon">NORTH<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 1.5 * PI</span></div> <aside class="tsd-sources"> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a name="one_cycle" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> ONE_<wbr>CYCLE</h3> <div class="tsd-signature tsd-kind-icon">ONE_<wbr>CYCLE<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 2 * PI</span></div> <aside class="tsd-sources"> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a name="south" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> SOUTH</h3> <div class="tsd-signature tsd-kind-icon">SOUTH<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0.5 * PI</span></div> <aside class="tsd-sources"> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a name="west" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> WEST</h3> <div class="tsd-signature tsd-kind-icon">WEST<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = PI</span></div> <aside class="tsd-sources"> </aside> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Methods</h2> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a name="deg2rad" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> deg2rad</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">deg2rad<span class="tsd-signature-symbol">(</span>deg<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></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Transfer a degree number to a radian number.<br> 角度转弧度</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>deg: <span class="tsd-signature-type">number</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a name="equal" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> equal</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">equal<span class="tsd-signature-symbol">(</span>rad1<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, rad2<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></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>The value of rad1 equals the value of rad1.<br></p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>rad1: <span class="tsd-signature-type">number</span></h5> </li> <li> <h5>rad2: <span class="tsd-signature-type">number</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a name="positive" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> positive</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">positive<span class="tsd-signature-symbol">(</span>rad<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></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Transfer a positive radian withe same angle.<br> 转换成正弧度</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>rad: <span class="tsd-signature-type">number</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a name="rad2deg" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> rad2deg</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">rad2deg<span class="tsd-signature-symbol">(</span>rad<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, limit<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><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"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Transfer a radian number to a degree number.<br> 弧度转角度</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>rad: <span class="tsd-signature-type">number</span></h5> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> limit: <span class="tsd-signature-type">boolean</span></h5> <div class="tsd-comment tsd-typography"> <p>True that the return value be limit in [0,2*PI)</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a name="reverse" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> reverse</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">reverse<span class="tsd-signature-symbol">(</span>rad<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></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Return a reverse direction.<br></p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>rad: <span class="tsd-signature-type">number</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4> </li> </ul> </section> </section> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="globals "> <a href="../globals.html"><em>Globals</em></a> </li> <li class="current tsd-kind-namespace"> <a href="../modules/js.html">JS</a> <ul> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.an.html">an</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.app.html">app</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.core.html">core</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.d2.html">d2</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.ds.html">ds</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.fx.html">fx</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.input.html">input</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.ioc.html">ioc</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.lang.html">lang</a> </li> <li class="current tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.math.html">math</a> <ul> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.math.geom.html">geom</a> </li> </ul> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.media.html">media</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.model.html">model</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.net.html">net</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.store.html">store</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.sugar.html">sugar</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.ui.html">ui</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.unit.html">unit</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.util.html">util</a> </li> <li class=" tsd-kind-namespace tsd-parent-kind-namespace"> <a href="../modules/js.view.html">view</a> </li> </ul> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> <li class=" tsd-kind-class tsd-parent-kind-namespace"> <a href="js.math.coords2.html" class="tsd-kind-icon">Coords2</a> </li> <li class=" tsd-kind-class tsd-parent-kind-namespace"> <a href="js.math.floats.html" class="tsd-kind-icon">Floats</a> </li> <li class=" tsd-kind-class tsd-parent-kind-namespace"> <a href="js.math.point2.html" class="tsd-kind-icon">Point2</a> </li> <li class=" tsd-kind-class tsd-parent-kind-namespace"> <a href="js.math.point3.html" class="tsd-kind-icon">Point3</a> </li> </ul> <ul class="current"> <li class="current tsd-kind-class tsd-parent-kind-namespace"> <a href="js.math.radians.html" class="tsd-kind-icon">Radians</a> <ul> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a href="js.math.radians.html#east" class="tsd-kind-icon">EAST</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a href="js.math.radians.html#north" class="tsd-kind-icon">NORTH</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a href="js.math.radians.html#one_cycle" class="tsd-kind-icon">ONE_<wbr>CYCLE</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a href="js.math.radians.html#south" class="tsd-kind-icon">SOUTH</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static"> <a href="js.math.radians.html#west" class="tsd-kind-icon">WEST</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a href="js.math.radians.html#deg2rad" class="tsd-kind-icon">deg2rad</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a href="js.math.radians.html#equal" class="tsd-kind-icon">equal</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a href="js.math.radians.html#positive" class="tsd-kind-icon">positive</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a href="js.math.radians.html#rad2deg" class="tsd-kind-icon">rad2deg</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static"> <a href="js.math.radians.html#reverse" class="tsd-kind-icon">reverse</a> </li> </ul> </li> </ul> <ul class="after-current"> <li class=" tsd-kind-class tsd-parent-kind-namespace"> <a href="js.math.vector2.html" class="tsd-kind-icon">Vector2</a> </li> <li class=" tsd-kind-class tsd-parent-kind-namespace"> <a href="js.math.vector3.html" class="tsd-kind-icon">Vector3</a> </li> <li class=" tsd-kind-type-alias tsd-parent-kind-namespace"> <a href="../modules/js.math.html#arraypoint2" class="tsd-kind-icon">Array<wbr>Point2</a> </li> <li class=" tsd-kind-type-alias tsd-parent-kind-namespace"> <a href="../modules/js.math.html#arraypoint3" class="tsd-kind-icon">Array<wbr>Point3</a> </li> <li class=" tsd-kind-type-alias tsd-parent-kind-namespace"> <a href="../modules/js.math.html#polarpoint2" class="tsd-kind-icon">Polar<wbr>Point2</a> </li> <li class=" tsd-kind-type-alias tsd-parent-kind-namespace"> <a href="../modules/js.math.html#polarpoint3" class="tsd-kind-icon">Polar<wbr>Point3</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported"> <a href="../modules/js.math.html#m" class="tsd-kind-icon">M</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported"> <a href="../modules/js.math.html#p" class="tsd-kind-icon">P</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported"> <a href="../modules/js.math.html#pi" class="tsd-kind-icon">PI</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported"> <a href="../modules/js.math.html#v" class="tsd-kind-icon">V</a> </li> </ul> </nav> </div> </div> </div> <footer> <div class="container"> <h2>Legend</h2> <div class="tsd-legend-group"> <ul class="tsd-legend"> <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> </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-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li> </ul> </div> </div> </footer> <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>