-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
size_2d, size_3d and size_nd classes now have a specialization with f…
…loat. size_nd now trims inside the string initialization constructor
- Loading branch information
Showing
6 changed files
with
339 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "size_2d.hpp" | ||
|
||
using namespace std; | ||
|
||
namespace scifir | ||
{ | ||
string to_string(const size_2d<float>& x) | ||
{ | ||
ostringstream output; | ||
output << x.width << " * " << x.height; | ||
return output.str(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "size_3d.hpp" | ||
|
||
using namespace std; | ||
|
||
namespace scifir | ||
{ | ||
string to_string(const size_3d<float>& x) | ||
{ | ||
ostringstream output; | ||
output << x.width << " * " << x.height << " * " << x.depth; | ||
return output.str(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "size_nd.hpp" | ||
|
||
using namespace std; | ||
|
||
namespace scifir | ||
{ | ||
string to_string(const size_nd<float>& x) | ||
{ | ||
ostringstream output; | ||
output << x.widths[0]; | ||
for (int i = 1; i < x.widths.size(); i++) | ||
{ | ||
output << " * " << x.widths[i]; | ||
} | ||
return output.str(); | ||
} | ||
} |
Oops, something went wrong.