Skip to content

Commit a55dc45

Browse files
authored
Merge pull request #5109 from WalterBright/math-comments
std.math: use proper block comments
2 parents bd42209 + 575d5de commit a55dc45

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

std/math.d

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4515,20 +4515,34 @@ public:
45154515
version (IeeeFlagsSupport)
45164516
{
45174517

4518-
/// The result cannot be represented exactly, so rounding occurred.
4519-
/// (example: x = sin(0.1); )
4518+
/**
4519+
* The result cannot be represented exactly, so rounding occurred.
4520+
* Example: `x = sin(0.1);`
4521+
*/
45204522
@property bool inexact() { return (flags & INEXACT_MASK) != 0; }
45214523

4522-
/// A zero was generated by underflow (example: x = real.min*real.epsilon/2;)
4524+
/**
4525+
* A zero was generated by underflow
4526+
* Example: `x = real.min*real.epsilon/2;`
4527+
*/
45234528
@property bool underflow() { return (flags & UNDERFLOW_MASK) != 0; }
45244529

4525-
/// An infinity was generated by overflow (example: x = real.max*2;)
4530+
/**
4531+
* An infinity was generated by overflow
4532+
* Example: `x = real.max*2;`
4533+
*/
45264534
@property bool overflow() { return (flags & OVERFLOW_MASK) != 0; }
45274535

4528-
/// An infinity was generated by division by zero (example: x = 3/0.0; )
4536+
/**
4537+
* An infinity was generated by division by zero
4538+
* Example: `x = 3/0.0;`
4539+
*/
45294540
@property bool divByZero() { return (flags & DIVBYZERO_MASK) != 0; }
45304541

4531-
/// A machine NaN was generated. (example: x = real.infinity * 0.0; )
4542+
/**
4543+
* A machine NaN was generated.
4544+
* Example: `x = real.infinity * 0.0;`
4545+
*/
45324546
@property bool invalid() { return (flags & INVALID_MASK) != 0; }
45334547

45344548
}
@@ -4573,7 +4587,7 @@ else version(ARM)
45734587
/// Set all of the floating-point status flags to false.
45744588
void resetIeeeFlags() { IeeeFlags.resetIeeeFlags(); }
45754589

4576-
/// Return a snapshot of the current state of the floating-point status flags.
4590+
/// Returns: snapshot of the current state of the floating-point status flags
45774591
@property IeeeFlags ieeeFlags()
45784592
{
45794593
return IeeeFlags(IeeeFlags.getIeeeFlags());
@@ -4745,7 +4759,7 @@ private:
47454759
static assert(false, "Architecture not supported");
47464760

47474761
public:
4748-
/// Returns true if the current FPU supports exception trapping
4762+
/// Returns: true if the current FPU supports exception trapping
47494763
@property static bool hasExceptionTraps() @safe nothrow @nogc
47504764
{
47514765
version(X86_Any)
@@ -4795,7 +4809,7 @@ public:
47954809
setControlState((getControlState() & ~ROUNDING_MASK) | (newMode & ROUNDING_MASK));
47964810
}
47974811

4798-
/// Return the exceptions which are currently enabled (unmasked)
4812+
/// Returns: the exceptions which are currently enabled (unmasked)
47994813
@property static uint enabledExceptions() @nogc
48004814
{
48014815
assert(hasExceptionTraps);
@@ -4805,7 +4819,7 @@ public:
48054819
return (getControlState() & EXCEPTION_MASK);
48064820
}
48074821

4808-
/// Return the currently active rounding mode
4822+
/// Returns: the currently active rounding mode
48094823
@property static RoundingMode rounding() @nogc
48104824
{
48114825
return cast(RoundingMode)(getControlState() & ROUNDING_MASK);

0 commit comments

Comments
 (0)