Difference between revisions of "FractionText Command"
From GeoGebra Manual
m (Typo) |
|||
Line 5: | Line 5: | ||
: Displays the coordinates of the point as fractions in the [[File:Menu view graphics.svg|link=|16px]] [[Graphics View]]. | : Displays the coordinates of the point as fractions in the [[File:Menu view graphics.svg|link=|16px]] [[Graphics View]]. | ||
: {{Example| 1=If ''A=(1.33,0.8)'' is a point, then <code>FractionText(A)</code> gives you the coordinates ''<math> \left( \frac{133}{100} ,\frac{4}{5} \right) </math>'' as a text.}} | : {{Example| 1=If ''A=(1.33,0.8)'' is a point, then <code>FractionText(A)</code> gives you the coordinates ''<math> \left( \frac{133}{100} ,\frac{4}{5} \right) </math>'' as a text.}} | ||
+ | ; FractionText( <Number>, <Boolean>): Converts the number to a fraction, which is displayed as a (LaTeX) text object in the [[File:Menu view graphics.svg|link=|16px]] [[Graphics View]]. | ||
+ | The boolean sets the position of a possible negative sign of the fraction. If ''true'', the minus sign will be displayed in the numerator, if ''false'' the minus sign will be displayed in front of the fraction. | ||
+ | :{{examples|1=<div> If ''n = -0.8 '' is a number, then | ||
+ | :*<code><nowiki>FractionText(n, true)</nowiki></code> yields <math>\frac{- 4}{5}</math> as a text. | ||
+ | :*<code><nowiki>FractionText(n, false)</nowiki></code> yields <math>-\frac{4}{5}</math> as a text.</div>}} | ||
{{Note|1= See also [[SurdText Command|SurdText]] command.}} | {{Note|1= See also [[SurdText Command|SurdText]] command.}} |
Revision as of 16:29, 23 January 2023
- FractionText( <Number> )
- Converts the number to a fraction, which is displayed as a (LaTeX) text object in the Graphics View.
- Example: If a: y = 1.5 x + 2 is a line, then
FractionText(Slope(a))
gives you the fraction 3/2 as a text.
- FractionText( <Point> )
- Displays the coordinates of the point as fractions in the Graphics View.
- Example: If A=(1.33,0.8) is a point, then
FractionText(A)
gives you the coordinates \left( \frac{133}{100} ,\frac{4}{5} \right) as a text.
- FractionText( <Number>, <Boolean>)
- Converts the number to a fraction, which is displayed as a (LaTeX) text object in the Graphics View.
The boolean sets the position of a possible negative sign of the fraction. If true, the minus sign will be displayed in the numerator, if false the minus sign will be displayed in front of the fraction.
- Examples:If n = -0.8 is a number, then
FractionText(n, true)
yields \frac{- 4}{5} as a text.FractionText(n, false)
yields -\frac{4}{5} as a text.
Note: See also SurdText command.