Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Unified Diff: third_party/WebKit/Source/wtf/dtoa.cpp

Issue 2386843002: reflow comments in wtf (Closed)
Patch Set: comments (heh!) Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/wtf/dtoa.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/dtoa.cpp
diff --git a/third_party/WebKit/Source/wtf/dtoa.cpp b/third_party/WebKit/Source/wtf/dtoa.cpp
index 064397779986e7663d63c49efe7b65cdd2e3f288..dc143e6982a30969a2b89065eaf0572241ee652f 100644
--- a/third_party/WebKit/Source/wtf/dtoa.cpp
+++ b/third_party/WebKit/Source/wtf/dtoa.cpp
@@ -3,7 +3,8 @@
* The author of this software is David M. Gay.
*
* Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
- * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2010, 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2010, 2012 Apple Inc.
+ * All rights reserved.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose without fee is hereby granted, provided that this entire notice
@@ -91,11 +92,16 @@ static inline const char* formatStringTruncatingTrailingZerosIfNeeded(
const char* numberToFixedPrecisionString(double d,
unsigned significantFigures,
NumberToStringBuffer buffer) {
- // Mimic String::format("%.[precision]g", ...), but use dtoas rounding facilities.
- // "g": Signed value printed in f or e format, whichever is more compact for the given value and precision.
- // The e format is used only when the exponent of the value is less than -4 or greater than or equal to the
- // precision argument. Trailing zeros are truncated, and the decimal point appears only if one or more digits follow it.
- // "precision": The precision specifies the maximum number of significant digits printed.
+ // Mimic String::format("%.[precision]g", ...), but use dtoas rounding
+ // facilities.
+ // "g": Signed value printed in f or e format, whichever is more compact for
+ // the given value and precision.
+ // The e format is used only when the exponent of the value is less than -4 or
+ // greater than or equal to the precision argument. Trailing zeros are
+ // truncated, and the decimal point appears only if one or more digits follow
+ // it.
+ // "precision": The precision specifies the maximum number of significant
+ // digits printed.
double_conversion::StringBuilder builder(buffer, NumberToStringBufferLength);
const double_conversion::DoubleToStringConverter& converter =
double_conversion::DoubleToStringConverter::EcmaScriptConverter();
@@ -109,13 +115,15 @@ const char* numberToFixedPrecisionString(double d,
const char* numberToFixedWidthString(double d,
unsigned decimalPlaces,
NumberToStringBuffer buffer) {
- // Mimic String::format("%.[precision]f", ...), but use dtoas rounding facilities.
- // "f": Signed value having the form [ - ]dddd.dddd, where dddd is one or more decimal digits.
- // The number of digits before the decimal point depends on the magnitude of the number, and
- // the number of digits after the decimal point depends on the requested precision.
- // "precision": The precision value specifies the number of digits after the decimal point.
- // If a decimal point appears, at least one digit appears before it.
- // The value is rounded to the appropriate number of digits.
+ // Mimic String::format("%.[precision]f", ...), but use dtoas rounding
+ // facilities.
+ // "f": Signed value having the form [ - ]dddd.dddd, where dddd is one or more
+ // decimal digits. The number of digits before the decimal point depends on
+ // the magnitude of the number, and the number of digits after the decimal
+ // point depends on the requested precision.
+ // "precision": The precision value specifies the number of digits after the
+ // decimal point. If a decimal point appears, at least one digit appears
+ // before it. The value is rounded to the appropriate number of digits.
double_conversion::StringBuilder builder(buffer, NumberToStringBufferLength);
const double_conversion::DoubleToStringConverter& converter =
double_conversion::DoubleToStringConverter::EcmaScriptConverter();
« no previous file with comments | « third_party/WebKit/Source/wtf/dtoa.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698