Skip to content

Commit 4c939a7

Browse files
committed
deploy: be22d21
1 parent cc15160 commit 4c939a7

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

cpp_tricks/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ <h2 id="_3">地板除与天花板除</h2>
613613
<p>等价于</p>
614614
<pre><code class="language-cpp">int c = floor((float)a / b); // c = floor(2.8) = 2
615615
</code></pre>
616-
<p>如果 <code>a</code> 除以 <code>b</code> 除不尽,那么会找到比他大的第一个整数作为结果,这就是<strong>地板除 (floor div)</strong></p>
616+
<p>如果 <code>a</code> 除以 <code>b</code> 除不尽,那么会找到比他小的第一个整数作为结果,这就是<strong>地板除 (floor div)</strong></p>
617617
<p>C 语言默认的就是地板除。</p>
618618
<p>如果我想要的是向上取整,该怎么写?</p>
619619
<p>最原始的写法是先转成浮点数来除,然后ceil函数向上取整:</p>

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ <h2 id="_1">前言</h2>
292292
<blockquote>
293293
<p><img src="./img/bulb.png" height="30px" width="auto" style="margin: 0; border: none"/> 本书还在持续更新中……要追番的话,可以在 <a href="https://github.com/parallel101/cppguidebook">GitHub</a> 点一下右上角的 “Watch” 按钮,每当小彭老师提交新 commit,GitHub 会向你发送一封电子邮件,提醒你小彭老师更新了。</p>
294294
</blockquote>
295-
<p>更新时间:2024年11月09日 11:37:54 (UTC+08:00)</p>
295+
<p>更新时间:2024年11月09日 11:39:40 (UTC+08:00)</p>
296296
<p><a href="https://parallel101.github.io/cppguidebook">在 GitHub Pages 浏览本书</a> | <a href="https://142857.red/book">在小彭老师自己维护的镜像上浏览本书</a></p>
297297
<h2 id="_2">格式约定</h2>
298298
<blockquote>

print_page/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ <h2 id="index-_1">前言</h2>
421421
<blockquote>
422422
<p><img src="../img/bulb.png" height="30px" width="auto" style="margin: 0; border: none"/> 本书还在持续更新中……要追番的话,可以在 <a href="https://github.com/parallel101/cppguidebook">GitHub</a> 点一下右上角的 “Watch” 按钮,每当小彭老师提交新 commit,GitHub 会向你发送一封电子邮件,提醒你小彭老师更新了。</p>
423423
</blockquote>
424-
<p>更新时间:2024年11月09日 11:37:54 (UTC+08:00)</p>
424+
<p>更新时间:2024年11月09日 11:39:40 (UTC+08:00)</p>
425425
<p><a href="https://parallel101.github.io/cppguidebook">在 GitHub Pages 浏览本书</a> | <a href="https://142857.red/book">在小彭老师自己维护的镜像上浏览本书</a></p>
426426
<h2 id="index-_2">格式约定</h2>
427427
<blockquote>
@@ -1241,7 +1241,7 @@ <h2 id="cpp_tricks-_3">地板除与天花板除</h2>
12411241
<p>等价于</p>
12421242
<pre><code class="language-cpp">int c = floor((float)a / b); // c = floor(2.8) = 2
12431243
</code></pre>
1244-
<p>如果 <code>a</code> 除以 <code>b</code> 除不尽,那么会找到比他大的第一个整数作为结果,这就是<strong>地板除 (floor div)</strong>。</p>
1244+
<p>如果 <code>a</code> 除以 <code>b</code> 除不尽,那么会找到比他小的第一个整数作为结果,这就是<strong>地板除 (floor div)</strong>。</p>
12451245
<p>C 语言默认的就是地板除。</p>
12461246
<p>如果我想要的是向上取整,该怎么写?</p>
12471247
<p>最原始的写法是先转成浮点数来除,然后ceil函数向上取整:</p>

search/search_index.json

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)