mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-23 00:38:47 +00:00
Add predefined Cuboid and Sphere values
This commit is contained in:
parent
88dcbdc3c6
commit
165cdf16d0
@ -1,4 +1,4 @@
|
||||
using System.Numerics;
|
||||
using System.Numerics;
|
||||
using X10D.Numerics;
|
||||
|
||||
namespace X10D.Drawing;
|
||||
@ -8,6 +8,17 @@ namespace X10D.Drawing;
|
||||
/// </summary>
|
||||
public readonly struct Cuboid : IEquatable<Cuboid>
|
||||
{
|
||||
/// <summary>
|
||||
/// The empty cuboid. That is, a cuboid whose size is zero.
|
||||
/// </summary>
|
||||
public static readonly Cuboid Empty = new();
|
||||
|
||||
/// <summary>
|
||||
/// A cube. That is, a cuboid whose size is the same in all three dimensions.
|
||||
/// </summary>
|
||||
/// <value>A cube with the size (1, 1, 1).</value>
|
||||
public static readonly Cuboid Cube = new(0, 0, 0, 1, 1, 1);
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Cuboid" /> struct.
|
||||
/// </summary>
|
||||
|
@ -7,6 +7,16 @@ namespace X10D.Drawing;
|
||||
/// </summary>
|
||||
public readonly struct Sphere : IEquatable<Sphere>, IComparable<Sphere>, IComparable
|
||||
{
|
||||
/// <summary>
|
||||
/// The empty sphere. That is, a sphere with a radius of zero.
|
||||
/// </summary>
|
||||
public static readonly Sphere Empty = new();
|
||||
|
||||
/// <summary>
|
||||
/// The unit sphere. That is, a sphere with a radius of 1.
|
||||
/// </summary>
|
||||
public static readonly Sphere Unit = new(0, 0, 0, 1f);
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Sphere" /> struct.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user