Files
phy/search.desc/emath/emath-desc-0-.js
Orion Kindel 0ce894e6b0 doc
2025-03-18 10:30:23 -05:00

1 line
10 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

searchState.loadedDescShard("emath", 0, "Opinionated 2D math library for building GUIs.\n+Y\nInfinite range that contains everything, from -∞ to …\nInfinite rectangle that contains every point.\nExtension trait to provide <code>ord()</code> method.\nThis struct tracks recent values of some time series.\nThe identity rotation: nothing rotates\nIs this an integer type?\n-X\nLargest finite value\nSmallest finite value\nAn invalid <code>Rangef</code> filled with <code>f32::NAN</code>.\nAn invalid <code>Rect</code> filled with <code>f32::NAN</code>.\nThe inverse of <code>Self::EVERYTHING</code>: stretches from positive …\nThe inverse of <code>Self::EVERYTHING</code>: stretches from positive …\nExtends <code>f32</code>, <code>Vec2</code> etc with <code>at_least</code> and <code>at_most</code> as aliases …\nImplemented for all builtin numeric types\nHelper trait to implement <code>lerp</code> and <code>remap</code>.\nWraps a floating-point value to add total order and hash. …\nA position on screen.\n+X\nInclusive range of floats, i.e. <code>min..=max</code>, but more …\nHelper trait to implement <code>lerp</code> and <code>remap</code>.\nA rectangular region of space.\nLinearly transforms positions from one <code>Rect</code> to another.\nRepresents a rotation in the 2D plane.\nLinearly transforms positions via a translation, then a …\n-Y\nA vector has a direction and length. A <code>Vec2</code> is often used …\nTwo bools, one for each axis (X and Y).\nRight\nDown\nThe zero position, the origin. The top left corner in a …\nA <code>Rect</code> filled with zeroes.\nValues must be added with a monotonically increasing time, …\nOne- and two-dimensional alignment (<code>Align::Center</code>, …\nAre both <code>x</code> and <code>y</code> true?\nReturn true when arguments are the same within some …\nMeasures the angle of the vector.\nCreate a unit vector with the given CW angle (in radians).\nTrue if any member is NaN.\nTrue if any member is NaN.\nTrue if any member is NaN.\nFlip <code>min</code> and <code>max</code> if needed, so that <code>min &lt;= max</code> after.\nWidth / height\nMore readable version of <code>self.max(lower_limit)</code>\nMore readable version of <code>self.min(upper_limit)</code>\nAverage times rate. If you are keeping track of individual …\n<code>max.y</code>\n<code>max.y</code>\nThe center of the range\nEquivalent to <code>x.clamp(min, max)</code>\nReturn the given points clamped to be inside the rectangle …\nIdentity rotation\nThe distance from the rect to the position, squared.\nThe distance from the rect to the position.\nThe dot-product of two vectors.\nAmount of time contained from start to end in this <code>History</code>.\nEase in, ease out.\nEasing functions for animations.\nA <code>Rect</code> that contains every point above a certain y …\nA <code>Rect</code> that contains every point below a certain y …\nA <code>Rect</code> that contains every point to the left of the given …\nA <code>Rect</code> that contains every point to the right of the given …\nExpand by this much on each side, keeping the center\nExpand by this much in each direction, keeping the center\nExpand by this much in each direction, keeping the center\nCalculate a lerp-factor for exponential smoothing using a …\nExpand to include the given x coordinate\nExpand to include the given y coordinate\nFlip the min and the max\nRemove samples that are too old.\nUse as few decimals as possible to show the value …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nAngle is clockwise in radians. A 𝞃/4 = 90° rotation …\nleft-top corner plus a size (stretching right-down).\nBounding-box around the points.\nA zero-sized rect at a specific point.\nReturns the bounding rectangle of the two points.\nIf you have a value animating over time, how much towards …\nThe intersection of two <code>Rect</code>, i.e. the area covered by …\nThe overlap of two ranges, i.e. the range that is …\nDo the two ranges intersect?\nDoes this Rect intersect the given ray (where <code>d</code> is …\nWhere does a ray from the center intersect the rectangle?\nCalls <code>U::from(self)</code>.\nCalls <code>U::from(self)</code>.\nCalls <code>U::from(self)</code>.\nCalls <code>U::from(self)</code>.\nCalls <code>U::from(self)</code>.\nCalls <code>U::from(self)</code>.\nCalls <code>U::from(self)</code>.\nCalls <code>U::from(self)</code>.\nCalls <code>U::from(self)</code>.\nCalls <code>U::from(self)</code>.\nInverts the transform.\nWhere in the range is this value? Returns 0-1 if within …\nTrue if all members are also finite.\nTrue if all members are also finite.\nTrue if all members are also finite.\n<code>width &lt; 0 || height &lt; 0</code>\nChecks if <code>self</code> has length <code>1.0</code> up to a precision of <code>1e-6</code>.\n<code>width &gt; 0 &amp;&amp; height &gt; 0</code>\n<code>(time, value)</code> pairs Time difference between values can be …\n<code>min.x</code>\n<code>min.x</code>\nCurrent number of values kept in history\nThe factor by which vectors will be scaled.\nLinear interpolation.\nLinearly interpolate towards another point, so that …\nLinearly interpolate so that <code>[0, 0]</code> is <code>Self::min</code> and <code>[1, 1]</code>…\nLinearly self towards other rect.\nThe other corner, opposing <code>Self::min</code>. Usually the right …\nReturns the maximum of <code>self.x</code> and <code>self.y</code>.\nMean time difference between values in this <code>History</code>.\nOne of the corners of the rectangle, usually the left top …\nReturns the minimum of <code>self.x</code> and <code>self.y</code>.\nApplies the right hand side transform, then the left hand …\nTransforms the given coordinate.\nTransforms the given rectangle.\nExample:\nCreates a new translation that first scales points around …\nSafe normalize: returns zero if input is zero.\nWrap angle to <code>[-PI, PI]</code> range.\nType to provide total order, useful as key in sorted …\n<code>pos2(x, y) == Pos2::new(x, y)</code>\nLinearly remap a value from one range to another, so that …\nLike <code>remap</code>, but also clamps the value so that the returned …\n<code>max.x</code>\n<code>max.x</code>\nRotates the vector by 90°, i.e positive X to positive Y …\nRotate the bounds (will expand the <code>Rect</code>)\nRound a value to the given number of decimal places.\nThe scale factors.\nScale up by this factor in each direction, keeping the …\nScale up by this factor in each direction, keeping the …\nScaling applied first, scaled around (0, 0).\n<code>max.y</code>\nKeep size\nkeep min\n<code>min.x</code>\n<code>max.x</code>\n<code>min.y</code>\nkeep min\nShrink by this much on each side, keeping the center\nShrink by this much in each direction, keeping the center\nShrink by this much in each direction, keeping the center\nSigned distance to the edge of the box.\n<code>rect.size() == Vec2 { x: rect.width(), y: rect.height() }</code>\nFind “simple” numbers is some range. Used by sliders.\nThe length of the range, i.e. <code>max - min</code>.\nSet both <code>x</code> and <code>y</code> to the same value.\nSplit rectangle in left and right halves. <code>t</code> is expected to …\nSplit rectangle in left and right halves at the given <code>x</code> …\nSplit rectangle in top and bottom halves. <code>t</code> is expected to …\nSplit rectangle in top and bottom halves at the given <code>y</code> …\n<code>[2, 1]</code> for wide screen, and <code>[1, 2]</code> for portrait, etc. At …\nTreat this vector as a position. <code>v.to_pos2()</code> is equivalent …\nThe vector from origin to this position. <code>p.to_vec2()</code> is …\nConvert to a float <code>Vec2</code> where the components are 1.0 for …\n<code>min.y</code>\n<code>min.y</code>\nTotal number of values seen. Includes those that have been …\nTransforms the given coordinate in the <code>from</code> space to the <code>to</code>…\nTransforms the given coordinate in the <code>from</code> space to the <code>to</code>…\nTransforms the given rectangle in the <code>in</code>-space to a …\nTranslation amount, applied after scaling.\nThe union of two bounding rectangle, i.e. the minimum <code>Rect</code> …\n<code>vec2(x, y) == Vec2::new(x, y)</code>\nCalculate a smooth velocity (per second) over the entire …\nHow far to the right.\nRightwards. Width.\nHow far down.\nDownwards. Height.\nSwizzle the axes.\nleft/center/right or top/center/bottom alignment for e.g. …\nTwo-dimension alignment, e.g. <code>Align2::LEFT_TOP</code>.\nConvenience for <code>Self::Max</code>\nHorizontal or vertical center.\nConvenience for <code>Self::Min</code>\nRight or bottom.\nLeft or top.\nConvenience for <code>Self::Max</code>\nConvenience for <code>Self::Min</code>\nReturns a range of given size within a specified range.\ne.g. center a size within a given frame\nUsed e.g. to anchor a piece of text to a part of the …\nUse this anchor to position something around <code>pos</code>, e.g. …\nAllocates a rectangle of the specified <code>size</code> inside the …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls <code>U::from(self)</code>.\nCalls <code>U::from(self)</code>.\nReturns the point on the rects frame or in the center …\nConvert <code>Min =&gt; 0.0</code>, <code>Center =&gt; 0.5</code> or <code>Max =&gt; 1.0</code>.\nConvert <code>Min =&gt; -1.0</code>, <code>Center =&gt; 0.0</code> or <code>Max =&gt; 1.0</code>.\n-1, 0, or +1 for each axis\nReturns an alignment by the X (horizontal) axis\nReturns an alignment by the Y (vertical) axis\nhttps://easings.net/#easeInBack\nhttps://easings.net/#easeInOutBack\nhttps://easings.net/#easeOutBack\nhttps://easings.net/#easeInBounce\nhttps://easings.net/#easeInOutBounce\nhttps://easings.net/#easeOutBounce\nhttps://easings.net/#easeInCirc\nhttps://easings.net/#easeInOutCirc\nhttps://easings.net/#easeOutCirc\nhttps://easings.net/#easeInCubic\nhttps://easings.net/#easeInOutCubic\nhttps://easings.net/#easeOutCubic\nhttps://easings.net/#easeInExpo\nhttps://easings.net/#easeInOutExpo\nhttps://easings.net/#easeOutExpo\nNo easing, just <code>y = x</code>\nhttps://easings.net/#easeInQuad\nhttps://easings.net/#easeInOutQuad\nhttps://easings.net/#easeOutQuad\nhttps://easings.net/#easeInSine\nhttps://easings.net/#easeInOutSine\nhttps://easings.net/#easeOuSine\nFind the “simplest” number in a closed range [min, max]…")