Skip to content

Commit

Permalink
[Docs] Use :ref: for all link to sections.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yi Huang authored and dm4 committed Nov 7, 2018
1 parent f6c8b88 commit 57d3f4e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ Operators

- Arithmetics: binary ``+``, binary ``-``, unary ``+``, unary ``-``, ``*``, ``/``, ``%``
- Comparisons: ``<=``, ``<``, ``==``, ``!=``, ``>=``, ``>``
- Conversions: see types-fixed-point-numbers-conversions_.
- Conversions: see :ref:`types-fixed-point-numbers-conversions`.

Arithmetic operators may cause implicit
`truncation <types-fixed-point-numbers-truncations_>`__.
:ref:`truncation <types-fixed-point-numbers-truncations>`.

Definition
``````````
Expand Down Expand Up @@ -67,7 +67,7 @@ Conversions between Literals and Fixed Point Types
``````````````````````````````````````````````````

Decimal literals can be converted to fixed point types
implicitly if no `truncation <types-fixed-point-numbers-truncations_>`__
implicitly if no :ref:`truncation <types-fixed-point-numbers-truncations>`
occurred.

.. code::
Expand All @@ -77,15 +77,15 @@ occurred.
ufixed8x2 b = 9.9; // rational 99/10 to ufixed8x2 [0.00, 2.56], fail
When `truncation <types-fixed-point-numbers-truncations_>`__ will occur,
When :ref:`truncation <types-fixed-point-numbers-truncations>` will occur,
explicit conversion is required.

.. code::
ufixed16x2 pi = ufixed16x2(3.1415926535); // truncated to 3.14
Explicit conversion is also required between different fixed point types
if it might cause `truncation <types-fixed-point-numbers-truncations_>`__.
if it might cause :ref:`truncation <types-fixed-point-numbers-truncations>`.

.. code::
Expand Down

0 comments on commit 57d3f4e

Please sign in to comment.