.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "LaTeXML::Common::Number 3pm" .TH LaTeXML::Common::Number 3pm 2024-02-27 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME "LaTeXML::Common::Number" \- representation of numbers; extends LaTeXML::Common::Object. .SS "Exported functions" .IX Subsection "Exported functions" .ie n .IP """$number = Number($num);""" 4 .el .IP "\f(CW$number = Number($num);\fR" 4 .IX Item "$number = Number($num);" Creates a Number object representing \f(CW$num\fR. .SS Methods .IX Subsection "Methods" .ie n .IP """@tokens = $object\->unlist;""" 4 .el .IP "\f(CW@tokens = $object\->unlist;\fR" 4 .IX Item "@tokens = $object->unlist;" Return a list of the tokens making up this \f(CW$object\fR. .ie n .IP """$string = $object\->toString;""" 4 .el .IP "\f(CW$string = $object\->toString;\fR" 4 .IX Item "$string = $object->toString;" Return a string representing \f(CW$object\fR. .ie n .IP """$string = $object\->ptValue;""" 4 .el .IP "\f(CW$string = $object\->ptValue;\fR" 4 .IX Item "$string = $object->ptValue;" Return a value representing \f(CW$object\fR without the measurement unit (pt) with limited decimal places. .ie n .IP """$string = $object\->pxValue;""" 4 .el .IP "\f(CW$string = $object\->pxValue;\fR" 4 .IX Item "$string = $object->pxValue;" Return an integer value representing \f(CW$object\fR in pixels. Uses the state variable \f(CW\*(C`DPI\*(C'\fR (dots per inch). .ie n .IP """$n = $object\->valueOf;""" 4 .el .IP "\f(CW$n = $object\->valueOf;\fR" 4 .IX Item "$n = $object->valueOf;" Return the value in scaled points (ignoring shrink and stretch, if any). .ie n .IP """$n = $object\->smaller($other);""" 4 .el .IP "\f(CW$n = $object\->smaller($other);\fR" 4 .IX Item "$n = $object->smaller($other);" Return \f(CW$object\fR or \f(CW$other\fR, whichever is smaller .ie n .IP """$n = $object\->larger($other);""" 4 .el .IP "\f(CW$n = $object\->larger($other);\fR" 4 .IX Item "$n = $object->larger($other);" Return \f(CW$object\fR or \f(CW$other\fR, whichever is larger .ie n .IP """$n = $object\->absolute;""" 4 .el .IP "\f(CW$n = $object\->absolute;\fR" 4 .IX Item "$n = $object->absolute;" Return an object representing the absolute value of the \f(CW$object\fR. .ie n .IP """$n = $object\->sign;""" 4 .el .IP "\f(CW$n = $object\->sign;\fR" 4 .IX Item "$n = $object->sign;" Return an integer: \-1 for negatives, 0 for 0 and 1 for positives .ie n .IP """$n = $object\->negate;""" 4 .el .IP "\f(CW$n = $object\->negate;\fR" 4 .IX Item "$n = $object->negate;" Return an object representing the negative of the \f(CW$object\fR. .ie n .IP """$n = $object\->add($other);""" 4 .el .IP "\f(CW$n = $object\->add($other);\fR" 4 .IX Item "$n = $object->add($other);" Return an object representing the sum of \f(CW$object\fR and \f(CW$other\fR .ie n .IP """$n = $object\->subtract($other);""" 4 .el .IP "\f(CW$n = $object\->subtract($other);\fR" 4 .IX Item "$n = $object->subtract($other);" Return an object representing the difference between \f(CW$object\fR and \f(CW$other\fR .ie n .IP """$n = $object\->multiply($n);""" 4 .el .IP "\f(CW$n = $object\->multiply($n);\fR" 4 .IX Item "$n = $object->multiply($n);" Return an object representing the product of \f(CW$object\fR and \f(CW$n\fR (a regular number). .ie n .IP """$n = $object\->divide($n);""" 4 .el .IP "\f(CW$n = $object\->divide($n);\fR" 4 .IX Item "$n = $object->divide($n);" Return an object representing the (truncating) division of \f(CW$object\fR by \f(CW$n\fR (a regular number). .ie n .IP """$n = $object\->divideround($n);""" 4 .el .IP "\f(CW$n = $object\->divideround($n);\fR" 4 .IX Item "$n = $object->divideround($n);" Return an object representing the (rounding) division of \f(CW$object\fR by \f(CW$n\fR (a regular number). .SH AUTHOR .IX Header "AUTHOR" Bruce Miller .SH COPYRIGHT .IX Header "COPYRIGHT" Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US.