Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pluralise descriptions for Duration Converts #101

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Units_Engine/Convert/Duration/Duration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@ public static double FromDuration(this double duration, object unit)
/***************************************************/

[Description("Convert SI units (seconds) into another duration unit.")]
[Input("second", "The number of seconds to convert.")]
[Input("seconds", "The number of seconds to convert.")]
[Input("unit", "The unit to convert to. This can be a string, or you can use the BHoM Enum DurationUnit.")]
[Output("duration", "The equivalent quantity defined in the specified unit.")]
public static double ToDuration(this double second, object unit)
public static double ToDuration(this double seconds, object unit)
{
if (Double.IsNaN(second) || Double.IsInfinity(second))
if (Double.IsNaN(seconds) || Double.IsInfinity(seconds))
{
Compute.RecordError("Quantity is not a real number.");
return double.NaN;
}

UN.QuantityValue qv = second;
UN.QuantityValue qv = seconds;
UNU.DurationUnit unitSI = UNU.DurationUnit.Second;
UNU.DurationUnit unUnit = ToDurationUnit(unit);
if (unUnit != UNU.DurationUnit.Undefined)
Expand Down