mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-10 03:45:41 +00:00
838 lines
38 KiB
HTML
838 lines
38 KiB
HTML
<!DOCTYPE html>
|
|
<!--[if IE]><![endif]-->
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<title>Class Int64Extensions
|
|
| X10D </title>
|
|
<meta name="viewport" content="width=device-width">
|
|
<meta name="title" content="Class Int64Extensions
|
|
| X10D ">
|
|
<meta name="generator" content="docfx 2.56.7.0">
|
|
|
|
<link rel="shortcut icon" href="../images/favicon.png">
|
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/night-owl.min.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css" integrity="sha384-EvBWSlnoFgZlXJvpzS+MAUEjvN7+gcCwH+qh7GRFOGgZO0PuwOFro7qPOJnLfe7l" crossorigin="anonymous">
|
|
<link rel="stylesheet" href="../styles/config.css">
|
|
<link rel="stylesheet" href="../styles/discord.css">
|
|
<link rel="stylesheet" href="../styles/singulink.css">
|
|
<link rel="stylesheet" href="../styles/main.css">
|
|
<meta property="docfx:navrel" content="../toc.html">
|
|
<meta property="docfx:tocrel" content="toc.html">
|
|
|
|
<meta property="docfx:rel" content="../">
|
|
<meta property="docfx:newtab" content="true">
|
|
</head>
|
|
<body>
|
|
<div class="top-navbar">
|
|
<a class="burger-icon" onclick="toggleMenu()">
|
|
<svg name="Hamburger" style="vertical-align: middle;" width="34" height="34" viewbox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M20 6H4V9H20V6ZM4 10.999H20V13.999H4V10.999ZM4 15.999H20V18.999H4V15.999Z"></path></svg>
|
|
</a>
|
|
|
|
|
|
<a class="brand" href="../index.html">
|
|
<img src="../images/favicon.png" alt="X10D" class="logomark">
|
|
<span class="brand-title">X10D</span>
|
|
</a> </div>
|
|
|
|
<div class="body-content">
|
|
<div id="blackout" class="blackout" onclick="toggleMenu()"></div>
|
|
|
|
<nav id="sidebar" role="navigation">
|
|
<div class="sidebar">
|
|
|
|
<div>
|
|
<div class="mobile-hide">
|
|
|
|
<a class="brand" href="../index.html">
|
|
<img src="../images/favicon.png" alt="X10D" class="logomark">
|
|
<span class="brand-title">X10D</span>
|
|
</a> </div>
|
|
|
|
<div class="sidesearch">
|
|
<form id="search" role="search" class="search">
|
|
<i class="bi bi-search search-icon"></i>
|
|
<input type="text" id="search-query" placeholder="Search" autocomplete="off">
|
|
</form>
|
|
</div>
|
|
|
|
<div id="navbar">
|
|
</div>
|
|
</div> <div class="sidebar-item-separator"></div>
|
|
|
|
<div id="sidetoggle">
|
|
<div id="sidetoc"></div>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<strong>DocFX + Singulink = ♥</strong>
|
|
|
|
</div> </nav>
|
|
|
|
<main class="main-panel">
|
|
|
|
<div id="search-results" style="display: none;">
|
|
<h1 class="search-list">Search Results for <span></span></h1>
|
|
<div class="sr-items">
|
|
<p><i class="bi bi-hourglass-split index-loading"></i></p>
|
|
</div>
|
|
<ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
|
|
</div>
|
|
<div role="main" class="hide-when-search">
|
|
|
|
<div class="subnav navbar navbar-default">
|
|
<div class="container hide-when-search" id="breadcrumb">
|
|
<ul class="breadcrumb">
|
|
<li></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<article class="content wrap" id="_content" data-uid="X10D.Math.Int64Extensions">
|
|
|
|
|
|
<h1 id="X10D_Math_Int64Extensions" data-uid="X10D.Math.Int64Extensions" class="text-break">Class Int64Extensions
|
|
</h1>
|
|
<div class="markdown level0 summary"><p>Extension methods for <see cref="!:System.Int64"></see>.</p>
|
|
</div>
|
|
<div class="markdown level0 conceptual"></div>
|
|
<div class="inheritance">
|
|
<h5>Inheritance</h5>
|
|
<div class="level0"><span class="xref">System.Object</span></div>
|
|
<div class="level1"><span class="xref">Int64Extensions</span></div>
|
|
</div>
|
|
<h6><strong>Namespace</strong>: <a class="xref" href="X10D.Math.html">X10D.Math</a></h6>
|
|
<h6><strong>Assembly</strong>: X10D.dll</h6>
|
|
<h5 id="X10D_Math_Int64Extensions_syntax">Syntax</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static class Int64Extensions : object</code></pre>
|
|
</div>
|
|
<h3 id="methods">Methods
|
|
</h3>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_Int64Extensions_CountDigits_System_Int64_.md&value=---%0Auid%3A%20X10D.Math.Int64Extensions.CountDigits(System.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/Int64Extensions.cs/#L18">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_Int64Extensions_CountDigits_" data-uid="X10D.Math.Int64Extensions.CountDigits*"></a>
|
|
<h4 id="X10D_Math_Int64Extensions_CountDigits_System_Int64_" data-uid="X10D.Math.Int64Extensions.CountDigits(System.Int64)">CountDigits(Int64)</h4>
|
|
<div class="markdown level1 summary"><p>Returns the number of digits in the current 64-bit signed integer.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static int CountDigits(this long value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value whose digit count to compute.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><p>The number of digits in <code data-dev-comment-type="paramref" class="paramref">value</code>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_Int64Extensions_DigitalRoot_System_Int64_.md&value=---%0Auid%3A%20X10D.Math.Int64Extensions.DigitalRoot(System.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/Int64Extensions.cs/#L37">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_Int64Extensions_DigitalRoot_" data-uid="X10D.Math.Int64Extensions.DigitalRoot*"></a>
|
|
<h4 id="X10D_Math_Int64Extensions_DigitalRoot_System_Int64_" data-uid="X10D.Math.Int64Extensions.DigitalRoot(System.Int64)">DigitalRoot(Int64)</h4>
|
|
<div class="markdown level1 summary"><p>Computes the digital root of this 64-bit integer.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static long DigitalRoot(this long value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value whose digital root to compute.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><p>The digital root of <code data-dev-comment-type="paramref" class="paramref">value</code>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 id="X10D_Math_Int64Extensions_DigitalRoot_System_Int64__remarks">Remarks</h5>
|
|
<div class="markdown level1 remarks"><p>The digital root is defined as the recursive sum of digits until that result is a single digit.</p>
|
|
<p>For example, the digital root of 239 is 5: <code>2 + 3 + 9 = 14</code>, then <code>1 + 4 = 5</code>.</p>
|
|
</div>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_Int64Extensions_Factorial_System_Int64_.md&value=---%0Auid%3A%20X10D.Math.Int64Extensions.Factorial(System.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/Int64Extensions.cs/#L51">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_Int64Extensions_Factorial_" data-uid="X10D.Math.Int64Extensions.Factorial*"></a>
|
|
<h4 id="X10D_Math_Int64Extensions_Factorial_System_Int64_" data-uid="X10D.Math.Int64Extensions.Factorial(System.Int64)">Factorial(Int64)</h4>
|
|
<div class="markdown level1 summary"><p>Returns the factorial of the current 64-bit signed integer.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static long Factorial(this long value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value whose factorial to compute.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><p>The factorial of <code data-dev-comment-type="paramref" class="paramref">value</code>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_Int64Extensions_GreatestCommonFactor_System_Int64_System_Int64_.md&value=---%0Auid%3A%20X10D.Math.Int64Extensions.GreatestCommonFactor(System.Int64%2CSystem.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/Int64Extensions.cs/#L80">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_Int64Extensions_GreatestCommonFactor_" data-uid="X10D.Math.Int64Extensions.GreatestCommonFactor*"></a>
|
|
<h4 id="X10D_Math_Int64Extensions_GreatestCommonFactor_System_Int64_System_Int64_" data-uid="X10D.Math.Int64Extensions.GreatestCommonFactor(System.Int64,System.Int64)">GreatestCommonFactor(Int64, Int64)</h4>
|
|
<div class="markdown level1 summary"><p>Calculates the greatest common factor between the current 64-bit signed integer, and another 64-bit unsigned integer.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static long GreatestCommonFactor(this long value, long other)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The first value.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">other</span></td>
|
|
<td><p>The second value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><p>The greatest common factor between <code data-dev-comment-type="paramref" class="paramref">value</code> and <code data-dev-comment-type="paramref" class="paramref">other</code>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_Int64Extensions_IsEven_System_Int64_.md&value=---%0Auid%3A%20X10D.Math.Int64Extensions.IsEven(System.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/Int64Extensions.cs/#L100">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_Int64Extensions_IsEven_" data-uid="X10D.Math.Int64Extensions.IsEven*"></a>
|
|
<h4 id="X10D_Math_Int64Extensions_IsEven_System_Int64_" data-uid="X10D.Math.Int64Extensions.IsEven(System.Int64)">IsEven(Int64)</h4>
|
|
<div class="markdown level1 summary"><p>Returns a value indicating whether the current value is evenly divisible by 2.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static bool IsEven(this long value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value whose parity to check.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Boolean</span></td>
|
|
<td><p><span class="xref">true</span> if <code data-dev-comment-type="paramref" class="paramref">value</code> is evenly divisible by 2, or <span class="xref">false</span>
|
|
otherwise.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_Int64Extensions_IsOdd_System_Int64_.md&value=---%0Auid%3A%20X10D.Math.Int64Extensions.IsOdd(System.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/Int64Extensions.cs/#L115">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_Int64Extensions_IsOdd_" data-uid="X10D.Math.Int64Extensions.IsOdd*"></a>
|
|
<h4 id="X10D_Math_Int64Extensions_IsOdd_System_Int64_" data-uid="X10D.Math.Int64Extensions.IsOdd(System.Int64)">IsOdd(Int64)</h4>
|
|
<div class="markdown level1 summary"><p>Returns a value indicating whether the current value is not evenly divisible by 2.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static bool IsOdd(this long value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value whose parity to check.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Boolean</span></td>
|
|
<td><p><span class="xref">true</span> if <code data-dev-comment-type="paramref" class="paramref">value</code> is not evenly divisible by 2, or <span class="xref">false</span>
|
|
otherwise.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_Int64Extensions_IsPrime_System_Int64_.md&value=---%0Auid%3A%20X10D.Math.Int64Extensions.IsPrime(System.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/Int64Extensions.cs/#L130">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_Int64Extensions_IsPrime_" data-uid="X10D.Math.Int64Extensions.IsPrime*"></a>
|
|
<h4 id="X10D_Math_Int64Extensions_IsPrime_System_Int64_" data-uid="X10D.Math.Int64Extensions.IsPrime(System.Int64)">IsPrime(Int64)</h4>
|
|
<div class="markdown level1 summary"><p>Returns a value indicating whether the current value is a prime number.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static bool IsPrime(this long value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value whose primality to check.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Boolean</span></td>
|
|
<td><p><span class="xref">true</span> if <code data-dev-comment-type="paramref" class="paramref">value</code> is prime; otherwise, <span class="xref">false</span>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_Int64Extensions_LowestCommonMultiple_System_Int64_System_Int64_.md&value=---%0Auid%3A%20X10D.Math.Int64Extensions.LowestCommonMultiple(System.Int64%2CSystem.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/Int64Extensions.cs/#L162">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_Int64Extensions_LowestCommonMultiple_" data-uid="X10D.Math.Int64Extensions.LowestCommonMultiple*"></a>
|
|
<h4 id="X10D_Math_Int64Extensions_LowestCommonMultiple_System_Int64_System_Int64_" data-uid="X10D.Math.Int64Extensions.LowestCommonMultiple(System.Int64,System.Int64)">LowestCommonMultiple(Int64, Int64)</h4>
|
|
<div class="markdown level1 summary"><p>Calculates the lowest common multiple between the current 64-bit signed integer, and another 64-bit signed integer.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static long LowestCommonMultiple(this long value, long other)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The first value.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">other</span></td>
|
|
<td><p>The second value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><p>The lowest common multiple between <code data-dev-comment-type="paramref" class="paramref">value</code> and <code data-dev-comment-type="paramref" class="paramref">other</code>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_Int64Extensions_Mod_System_Int64_System_Int64_.md&value=---%0Auid%3A%20X10D.Math.Int64Extensions.Mod(System.Int64%2CSystem.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/Int64Extensions.cs/#L199">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_Int64Extensions_Mod_" data-uid="X10D.Math.Int64Extensions.Mod*"></a>
|
|
<h4 id="X10D_Math_Int64Extensions_Mod_System_Int64_System_Int64_" data-uid="X10D.Math.Int64Extensions.Mod(System.Int64,System.Int64)">Mod(Int64, Int64)</h4>
|
|
<div class="markdown level1 summary"><p>Performs a modulo operation which supports a negative dividend.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static long Mod(this long dividend, long divisor)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">dividend</span></td>
|
|
<td><p>The dividend.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">divisor</span></td>
|
|
<td><p>The divisor.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><p>The result of <code>dividend mod divisor</code>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 id="X10D_Math_Int64Extensions_Mod_System_Int64_System_Int64__remarks">Remarks</h5>
|
|
<div class="markdown level1 remarks"><p>The <code>%</code> operator (commonly called the modulo operator) in C# is not defined to be modulo, but is instead
|
|
remainder. This quirk inherently makes it difficult to use modulo in a negative context, as <code>x % y</code> where x is
|
|
negative will return a negative value, akin to <code>-(x % y)</code>, even if precedence is forced. This method provides a
|
|
modulo operation which supports negative dividends.</p>
|
|
</div>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_Int64Extensions_MultiplicativePersistence_System_Int64_.md&value=---%0Auid%3A%20X10D.Math.Int64Extensions.MultiplicativePersistence(System.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/Int64Extensions.cs/#L216">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_Int64Extensions_MultiplicativePersistence_" data-uid="X10D.Math.Int64Extensions.MultiplicativePersistence*"></a>
|
|
<h4 id="X10D_Math_Int64Extensions_MultiplicativePersistence_System_Int64_" data-uid="X10D.Math.Int64Extensions.MultiplicativePersistence(System.Int64)">MultiplicativePersistence(Int64)</h4>
|
|
<div class="markdown level1 summary"><p>Returns the multiplicative persistence of a specified value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static int MultiplicativePersistence(this long value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value whose multiplicative persistence to calculate.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><p>The multiplicative persistence.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 id="X10D_Math_Int64Extensions_MultiplicativePersistence_System_Int64__remarks">Remarks</h5>
|
|
<div class="markdown level1 remarks"><p>Multiplicative persistence is defined as the recursive digital product until that product is a single digit.</p>
|
|
</div>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_Int64Extensions_Sign_System_Int64_.md&value=---%0Auid%3A%20X10D.Math.Int64Extensions.Sign(System.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/Int64Extensions.cs/#L281">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_Int64Extensions_Sign_" data-uid="X10D.Math.Int64Extensions.Sign*"></a>
|
|
<h4 id="X10D_Math_Int64Extensions_Sign_System_Int64_" data-uid="X10D.Math.Int64Extensions.Sign(System.Int64)">Sign(Int64)</h4>
|
|
<div class="markdown level1 summary"><p>Returns an integer that indicates the sign of this 64-bit signed integer.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static int Sign(this long value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>A signed number.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int32</span></td>
|
|
<td><p>A number that indicates the sign of <code data-dev-comment-type="paramref" class="paramref">value</code>, as shown in the following table.</p>
|
|
<table><thead><tr><th>Return value</th><th>Meaning</th></tr></thead><tbody><tr><td>-1</td><td><code data-dev-comment-type="paramref" class="paramref">value</code> is less than zero.</td></tr><tr><td>0</td><td><code data-dev-comment-type="paramref" class="paramref">value</code> is equal to zero.</td></tr><tr><td>1</td><td><code data-dev-comment-type="paramref" class="paramref">value</code> is greater than zero.</td></tr></tbody></table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_Int64Extensions_Wrap_System_Int64_System_Int64_.md&value=---%0Auid%3A%20X10D.Math.Int64Extensions.Wrap(System.Int64%2CSystem.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/Int64Extensions.cs/#L309">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_Int64Extensions_Wrap_" data-uid="X10D.Math.Int64Extensions.Wrap*"></a>
|
|
<h4 id="X10D_Math_Int64Extensions_Wrap_System_Int64_System_Int64_" data-uid="X10D.Math.Int64Extensions.Wrap(System.Int64,System.Int64)">Wrap(Int64, Int64)</h4>
|
|
<div class="markdown level1 summary"><p>Wraps the current 64-bit signed integer between 0 and a high value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static long Wrap(this long value, long length)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value to wrap.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">length</span></td>
|
|
<td><p>The exclusive upper bound.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><p>The wrapped value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_Int64Extensions_Wrap_System_Int64_System_Int64_System_Int64_.md&value=---%0Auid%3A%20X10D.Math.Int64Extensions.Wrap(System.Int64%2CSystem.Int64%2CSystem.Int64)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/Int64Extensions.cs/#L295">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_Int64Extensions_Wrap_" data-uid="X10D.Math.Int64Extensions.Wrap*"></a>
|
|
<h4 id="X10D_Math_Int64Extensions_Wrap_System_Int64_System_Int64_System_Int64_" data-uid="X10D.Math.Int64Extensions.Wrap(System.Int64,System.Int64,System.Int64)">Wrap(Int64, Int64, Int64)</h4>
|
|
<div class="markdown level1 summary"><p>Wraps the current 64-bit signed integer between a low and a high value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static long Wrap(this long value, long low, long high)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value to wrap.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">low</span></td>
|
|
<td><p>The inclusive lower bound.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><span class="parametername">high</span></td>
|
|
<td><p>The exclusive upper bound.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Int64</span></td>
|
|
<td><p>The wrapped value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</article>
|
|
</div>
|
|
|
|
<div class="copyright-footer">
|
|
<span>© Singulink. All rights reserved.</span>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
|
|
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js"></script>
|
|
<script type="text/javascript" src="../styles/jquery.twbsPagination.js"></script>
|
|
<script type="text/javascript" src="../styles/url.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js"></script>
|
|
<script type="text/javascript" src="../styles/docfx.js"></script>
|
|
<script type="text/javascript" src="../styles/singulink.js"></script>
|
|
<script type="text/javascript" src="../styles/main.js"></script> </body>
|
|
</html>
|