1LaTeXML::Common::NumberU(s3e)r Contributed Perl DocumentaLtaiToenXML::Common::Number(3)
2
3
4

NAME

6       "LaTeXML::Common::Number" - representation of numbers; extends
7       LaTeXML::Common::Object.
8
9   Exported functions
10       "$number = Number($num);"
11           Creates a Number object representing $num.
12
13   Methods
14       "@tokens = $object->unlist;"
15           Return a list of the tokens making up this $object.
16
17       "$string = $object->toString;"
18           Return a string representing $object.
19
20       "$string = $object->ptValue;"
21           Return a value representing $object without the measurement unit
22           (pt) with limited decimal places.
23
24       "$string = $object->pxValue;"
25           Return an integer value representing $object in pixels.  Uses the
26           state variable "DPI" (dots per inch).
27
28       "$n = $object->valueOf;"
29           Return the value in scaled points (ignoring shrink and stretch, if
30           any).
31
32       "$n = $object->smaller($other);"
33           Return $object or $other, whichever is smaller
34
35       "$n = $object->larger($other);"
36           Return $object or $other, whichever is larger
37
38       "$n = $object->absolute;"
39           Return an object representing the absolute value of the $object.
40
41       "$n = $object->sign;"
42           Return an integer: -1 for negatives, 0 for 0 and 1 for positives
43
44       "$n = $object->negate;"
45           Return an object representing the negative of the $object.
46
47       "$n = $object->add($other);"
48           Return an object representing the sum of $object and $other
49
50       "$n = $object->subtract($other);"
51           Return an object representing the difference between $object and
52           $other
53
54       "$n = $object->multiply($n);"
55           Return an object representing the product of $object and $n (a
56           regular number).
57
58       "$n = $object->divide($n);"
59           Return an object representing the (truncating) division of $object
60           by $n (a regular number).
61
62       "$n = $object->divideround($n);"
63           Return an object representing the (rounding) division of $object by
64           $n (a regular number).
65

AUTHOR

67       Bruce Miller <bruce.miller@nist.gov>
68
70       Public domain software, produced as part of work done by the United
71       States Government & not subject to copyright in the US.
72
73
74
75perl v5.30.0                      2019-10-13        LaTeXML::Common::Number(3)
Impressum