Skip to content

Commit dbc2e99

Browse files
committed
Use /// doc-comment form instead of /** */
1 parent ad0b337 commit dbc2e99

File tree

7 files changed

+662
-663
lines changed

7 files changed

+662
-663
lines changed

src/libcore/num/f32.rs

Lines changed: 138 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,13 @@ impl Signed for f32 {
304304
#[inline(always)]
305305
fn abs(&self) -> f32 { abs(*self) }
306306

307-
/**
308-
* # Returns
309-
*
310-
* - `1.0` if the number is positive, `+0.0` or `infinity`
311-
* - `-1.0` if the number is negative, `-0.0` or `neg_infinity`
312-
* - `NaN` if the number is `NaN`
313-
*/
307+
///
308+
/// # Returns
309+
///
310+
/// - `1.0` if the number is positive, `+0.0` or `infinity`
311+
/// - `-1.0` if the number is negative, `-0.0` or `neg_infinity`
312+
/// - `NaN` if the number is NaN
313+
///
314314
#[inline(always)]
315315
fn signum(&self) -> f32 {
316316
if is_NaN(*self) { NaN } else { copysign(1.0, *self) }
@@ -509,52 +509,52 @@ impl Real for f32 {
509509
fn tanh(&self) -> f32 { tanh(*self) }
510510
}
511511

512-
/**
513-
* Section: String Conversions
514-
*/
512+
//
513+
// Section: String Conversions
514+
//
515515

516-
/**
517-
* Converts a float to a string
518-
*
519-
* # Arguments
520-
*
521-
* * num - The float value
522-
*/
516+
///
517+
/// Converts a float to a string
518+
///
519+
/// # Arguments
520+
///
521+
/// * num - The float value
522+
///
523523
#[inline(always)]
524524
pub fn to_str(num: f32) -> ~str {
525525
let (r, _) = strconv::to_str_common(
526526
&num, 10u, true, strconv::SignNeg, strconv::DigAll);
527527
r
528528
}
529529

530-
/**
531-
* Converts a float to a string in hexadecimal format
532-
*
533-
* # Arguments
534-
*
535-
* * num - The float value
536-
*/
530+
///
531+
/// Converts a float to a string in hexadecimal format
532+
///
533+
/// # Arguments
534+
///
535+
/// * num - The float value
536+
///
537537
#[inline(always)]
538538
pub fn to_str_hex(num: f32) -> ~str {
539539
let (r, _) = strconv::to_str_common(
540540
&num, 16u, true, strconv::SignNeg, strconv::DigAll);
541541
r
542542
}
543543

544-
/**
545-
* Converts a float to a string in a given radix
546-
*
547-
* # Arguments
548-
*
549-
* * num - The float value
550-
* * radix - The base to use
551-
*
552-
* # Failure
553-
*
554-
* Fails if called on a special value like `inf`, `-inf` or `NaN` due to
555-
* possible misinterpretation of the result at higher bases. If those values
556-
* are expected, use `to_str_radix_special()` instead.
557-
*/
544+
///
545+
/// Converts a float to a string in a given radix
546+
///
547+
/// # Arguments
548+
///
549+
/// * num - The float value
550+
/// * radix - The base to use
551+
///
552+
/// # Failure
553+
///
554+
/// Fails if called on a special value like `inf`, `-inf` or `NaN` due to
555+
/// possible misinterpretation of the result at higher bases. If those values
556+
/// are expected, use `to_str_radix_special()` instead.
557+
///
558558
#[inline(always)]
559559
pub fn to_str_radix(num: f32, rdx: uint) -> ~str {
560560
let (r, special) = strconv::to_str_common(
@@ -564,46 +564,46 @@ pub fn to_str_radix(num: f32, rdx: uint) -> ~str {
564564
r
565565
}
566566
567-
/**
568-
* Converts a float to a string in a given radix, and a flag indicating
569-
* whether it's a special value
570-
*
571-
* # Arguments
572-
*
573-
* * num - The float value
574-
* * radix - The base to use
575-
*/
567+
///
568+
/// Converts a float to a string in a given radix, and a flag indicating
569+
/// whether it's a special value
570+
///
571+
/// # Arguments
572+
///
573+
/// * num - The float value
574+
/// * radix - The base to use
575+
///
576576
#[inline(always)]
577577
pub fn to_str_radix_special(num: f32, rdx: uint) -> (~str, bool) {
578578
strconv::to_str_common(&num, rdx, true,
579579
strconv::SignNeg, strconv::DigAll)
580580
}
581581
582-
/**
583-
* Converts a float to a string with exactly the number of
584-
* provided significant digits
585-
*
586-
* # Arguments
587-
*
588-
* * num - The float value
589-
* * digits - The number of significant digits
590-
*/
582+
///
583+
/// Converts a float to a string with exactly the number of
584+
/// provided significant digits
585+
///
586+
/// # Arguments
587+
///
588+
/// * num - The float value
589+
/// * digits - The number of significant digits
590+
///
591591
#[inline(always)]
592592
pub fn to_str_exact(num: f32, dig: uint) -> ~str {
593593
let (r, _) = strconv::to_str_common(
594594
&num, 10u, true, strconv::SignNeg, strconv::DigExact(dig));
595595
r
596596
}
597597
598-
/**
599-
* Converts a float to a string with a maximum number of
600-
* significant digits
601-
*
602-
* # Arguments
603-
*
604-
* * num - The float value
605-
* * digits - The number of significant digits
606-
*/
598+
///
599+
/// Converts a float to a string with a maximum number of
600+
/// significant digits
601+
///
602+
/// # Arguments
603+
///
604+
/// * num - The float value
605+
/// * digits - The number of significant digits
606+
///
607607
#[inline(always)]
608608
pub fn to_str_digits(num: f32, dig: uint) -> ~str {
609609
let (r, _) = strconv::to_str_common(
@@ -623,91 +623,91 @@ impl num::ToStrRadix for f32 {
623623
}
624624
}
625625
626-
/**
627-
* Convert a string in base 10 to a float.
628-
* Accepts a optional decimal exponent.
629-
*
630-
* This function accepts strings such as
631-
*
632-
* * '3.14'
633-
* * '+3.14', equivalent to '3.14'
634-
* * '-3.14'
635-
* * '2.5E10', or equivalently, '2.5e10'
636-
* * '2.5E-10'
637-
* * '.' (understood as 0)
638-
* * '5.'
639-
* * '.5', or, equivalently, '0.5'
640-
* * '+inf', 'inf', '-inf', 'NaN'
641-
*
642-
* Leading and trailing whitespace represent an error.
643-
*
644-
* # Arguments
645-
*
646-
* * num - A string
647-
*
648-
* # Return value
649-
*
650-
* `none` if the string did not represent a valid number. Otherwise,
651-
* `Some(n)` where `n` is the floating-point number represented by `num`.
652-
*/
626+
///
627+
/// Convert a string in base 10 to a float.
628+
/// Accepts a optional decimal exponent.
629+
///
630+
/// This function accepts strings such as
631+
///
632+
/// * '3.14'
633+
/// * '+3.14', equivalent to '3.14'
634+
/// * '-3.14'
635+
/// * '2.5E10', or equivalently, '2.5e10'
636+
/// * '2.5E-10'
637+
/// * '.' (understood as 0)
638+
/// * '5.'
639+
/// * '.5', or, equivalently, '0.5'
640+
/// * '+inf', 'inf', '-inf', 'NaN'
641+
///
642+
/// Leading and trailing whitespace represent an error.
643+
///
644+
/// # Arguments
645+
///
646+
/// * num - A string
647+
///
648+
/// # Return value
649+
///
650+
/// `none` if the string did not represent a valid number. Otherwise,
651+
/// `Some(n)` where `n` is the floating-point number represented by `num`.
652+
///
653653
#[inline(always)]
654654
pub fn from_str(num: &str) -> Option<f32> {
655655
strconv::from_str_common(num, 10u, true, true, true,
656656
strconv::ExpDec, false, false)
657657
}
658658
659-
/**
660-
* Convert a string in base 16 to a float.
661-
* Accepts a optional binary exponent.
662-
*
663-
* This function accepts strings such as
664-
*
665-
* * 'a4.fe'
666-
* * '+a4.fe', equivalent to 'a4.fe'
667-
* * '-a4.fe'
668-
* * '2b.aP128', or equivalently, '2b.ap128'
669-
* * '2b.aP-128'
670-
* * '.' (understood as 0)
671-
* * 'c.'
672-
* * '.c', or, equivalently, '0.c'
673-
* * '+inf', 'inf', '-inf', 'NaN'
674-
*
675-
* Leading and trailing whitespace represent an error.
676-
*
677-
* # Arguments
678-
*
679-
* * num - A string
680-
*
681-
* # Return value
682-
*
683-
* `none` if the string did not represent a valid number. Otherwise,
684-
* `Some(n)` where `n` is the floating-point number represented by `[num]`.
685-
*/
659+
///
660+
/// Convert a string in base 16 to a float.
661+
/// Accepts a optional binary exponent.
662+
///
663+
/// This function accepts strings such as
664+
///
665+
/// * 'a4.fe'
666+
/// * '+a4.fe', equivalent to 'a4.fe'
667+
/// * '-a4.fe'
668+
/// * '2b.aP128', or equivalently, '2b.ap128'
669+
/// * '2b.aP-128'
670+
/// * '.' (understood as 0)
671+
/// * 'c.'
672+
/// * '.c', or, equivalently, '0.c'
673+
/// * '+inf', 'inf', '-inf', 'NaN'
674+
///
675+
/// Leading and trailing whitespace represent an error.
676+
///
677+
/// # Arguments
678+
///
679+
/// * num - A string
680+
///
681+
/// # Return value
682+
///
683+
/// `none` if the string did not represent a valid number. Otherwise,
684+
/// `Some(n)` where `n` is the floating-point number represented by `[num]`.
685+
///
686686
#[inline(always)]
687687
pub fn from_str_hex(num: &str) -> Option<f32> {
688688
strconv::from_str_common(num, 16u, true, true, true,
689689
strconv::ExpBin, false, false)
690690
}
691691
692-
/**
693-
* Convert a string in an given base to a float.
694-
*
695-
* Due to possible conflicts, this function does **not** accept
696-
* the special values `inf`, `-inf`, `+inf` and `NaN`, **nor**
697-
* does it recognize exponents of any kind.
698-
*
699-
* Leading and trailing whitespace represent an error.
700-
*
701-
* # Arguments
702-
*
703-
* * num - A string
704-
* * radix - The base to use. Must lie in the range [2 .. 36]
705-
*
706-
* # Return value
707-
*
708-
* `none` if the string did not represent a valid number. Otherwise,
709-
* `Some(n)` where `n` is the floating-point number represented by `num`.
710-
*/
692+
///
693+
/// Convert a string in an given base to a float.
694+
///
695+
/// Due to possible conflicts, this function does **not** accept
696+
/// the special values `inf`, `-inf`, `+inf` and `NaN`, **nor**
697+
/// does it recognize exponents of any kind.
698+
///
699+
/// Leading and trailing whitespace represent an error.
700+
///
701+
/// # Arguments
702+
///
703+
/// * num - A string
704+
/// * radix - The base to use. Must lie in the range [2 .. 36]
705+
///
706+
/// # Return value
707+
///
708+
/// `none` if the string did not represent a valid number. Otherwise,
709+
/// `Some(n)` where `n` is the floating-point number represented by `num`.
710+
///
711711
#[inline(always)]
712712
pub fn from_str_radix(num: &str, rdx: uint) -> Option<f32> {
713713
strconv::from_str_common(num, rdx, true, true, false,

0 commit comments

Comments
 (0)