public readonly struct Int2A two-component integer vector: pixel and texel coordinates, texture and window sizes, grid cells — the places where a Vector2 would invite a rounding decision that has no right answer.
No guide page documents this yet — the page shows what the code says about itself.
Fields and properties (8)
public readonly int XThe X component.
public readonly int YThe Y component.
public static Int2 ZeroAll components zero.
public static Int2 OneAll components one.
public static Int2 UnitXThe X axis.
public static Int2 UnitYThe Y axis.
public int this[int index]The component at .
public long AreaThe product of the components — the area of a size, the texel count of an extent.
Methods (22)
public Int2(int x, int y)Builds a vector from its components.
public Int2(int value)Builds a vector with every component set to .
public static Int2 Min(Int2 left, Int2 right)The component-wise minimum.
public static Int2 Max(Int2 left, Int2 right)The component-wise maximum.
public static Int2 Clamp(Int2 value, Int2 min, Int2 max)Constrains each component to the matching interval.
public static Int2 operator +(Int2 left, Int2 right)Adds two vectors.
public static Int2 operator -(Int2 left, Int2 right)Subtracts one vector from another.
public static Int2 operator -(Int2 value)Negates a vector.
public static Int2 operator *(Int2 left, Int2 right)Multiplies component by component.
public static Int2 operator *(Int2 value, int scale)Scales a vector.
public static Int2 operator *(int scale, Int2 value)Scales a vector.
public static Int2 operator /(Int2 left, Int2 right)Divides component by component, truncating toward zero.
public static Int2 operator /(Int2 value, int divisor)Divides by a scalar, truncating toward zero.
public static bool operator ==(Int2 left, Int2 right)Component-wise equality.
public static bool operator !=(Int2 left, Int2 right)The negation of op_Equality.
public static implicit operator Vector2(Int2 value)Widens to a float vector, which is always exact for these magnitudes.
public void Deconstruct(out int x, out int y)Splits the vector into its components.
public bool Equals(Int2 other)Indicates whether the current object is equal to another object of the same type.
public override bool Equals(object? obj)Indicates whether this instance and a specified object are equal.
public override int GetHashCode()Returns the hash code for this instance.
public override string ToString()Returns the fully qualified type name of this instance.
public string ToString(string? format, IFormatProvider? formatProvider)Formats the value of the current instance using the specified format.
Used by (223, showing 40)
- PbrShowcaseGamePbrShowcase
- ProgramHelloUi
- TriangleGameHelloTriangle
- UiHostHelloUi
- VideoGameVideoPlayback
- VirtualGeometryGameVirtualGeometry
- AccelerationStructureDeviceTestsVixen.Graphics.Golden.Tests
- AdaptiveProbeTestsVixen.Rendering.ScreenProbes.Tests
- AmbientOcclusionRendererVixen.Rendering.PostFx
- AppGraphicsVixen.App.Hosting
- AtlasConventionTestsVixen.Rendering.ScreenProbes.Tests
- AutoExposureRendererVixen.Rendering.PostFx
- AutoExposureTestsVixen.Rendering.PostFx.Tests
- BinVixen.Rendering
- BloomRendererVixen.Rendering.PostFx
- BloomTestsVixen.Rendering.PostFx.Tests
- CardRadiosityVixen.Rendering.SurfaceCache
- CellVixen.Rendering
- ClipboardImageVixen.Platform
- ClusterAttributeTestsVixen.Rendering.Tests
- ClusterAttributesVixen.Rendering
- ClusterSoftwareRasterConstantsVixen.Rendering
- ClusterSoftwareRasterKeysVixen.Rendering
- CompositorFrameVixen.Rendering
- CornellBoxTestsVixen.Rendering.SurfaceCache.Tests
- DesktopDisplaysVixen.Platform.Desktop
- DesktopPlatformVixen.Platform.Desktop
- DesktopPlatformTestsVixen.Platform.Desktop.Tests
- DesktopSurfaceVixen.Platform.Desktop
- DesktopWindowVixen.Platform.Desktop
- DibImageVixen.Platform.Windows
- DibImageTestsVixen.Platform.Windows.Tests
- DisplayModeVixen.Platform
- DistanceFieldAoRendererVixen.Rendering.PostFx
- EffectLoaderVixen.Shaders
- EglAttributeTestsVixen.Graphics.OpenGL.Tests
- EglAttributesVixen.Graphics.OpenGL
- EglContextVixen.Graphics.OpenGL
- EglContextOptionsVixen.Graphics.OpenGL
- EglContextTestsVixen.Graphics.OpenGL.Tests