Scylla Framework
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • Scylla.Core
      • Char
      • FileLog
      • ILogReceiver
      • IScyllaDependencyProvider
      • Log
      • LogCategory
      • LogEntry
      • LogFileFormat
      • LogLevel
      • Num
      • ScyllaAAMode
      • ScyllaAAQuality
      • ScyllaBootstrap
      • ScyllaCore
      • ScyllaCore.Meta
      • ScyllaDependencyInfoData
      • ScyllaMaterialSurface
      • ScyllaRenderPipeline
      • ScyllaShadowResolution
      • Str
      • TextAlignment
      • UnityConsoleLog
    • Scylla.Core.Attributes
      • AttributeValidator
      • CompareOperator
      • ConditionalAttributeBase
      • DisableIfAttribute
      • DisplayNameAttribute
      • EnableIfAttribute
      • FoldoutAttribute
      • FormerlySerializedAsAttribute
      • GroupAttribute
      • HideIfAttribute
      • HideInFilterWindowAttribute
      • HorizontalLineAttribute
      • InfoBoxAttribute
      • InfoType
      • LayerFieldAttribute
      • MinMaxRangeAttribute
      • MonoTextAreaAttribute
      • NotEmptyAttribute
      • NotNullAttribute
      • ReadOnlyAttribute
      • ReflectedTypeAttribute
      • RequiredAttribute
      • SceneFieldAttribute
      • ShowIfAttribute
      • SortingLayerFieldAttribute
      • TagFieldAttribute
      • TitleAttribute
      • ValidateInputAttribute
      • ValidationException
    • Scylla.Core.Config
      • ConfigFileManager
      • ConfigurationRegistry
      • ConfigurationSlotAttribute
      • ConfigurationValidationResult
      • ConsoleLoggingSettings
      • FileLogFormattingSettings
      • FileLoggingSettings
      • IConfigurationRegistry
      • ScyllaConfiguration
      • ScyllaCoreConfiguration
      • ScyllaEventConfiguration
      • ScyllaLoggerConfiguration
      • ValidationSeverity
    • Scylla.Core.Editor
      • CalendarDefinitionEditor
      • ClockDefinitionEditor
      • ColorGradientAssetEditor
      • ColorGradientReducer
      • ColorPaletteAssetEditor
      • DebugCameraEditor
      • DebugEventMonitor
      • DependencySourceType
      • DependencyStatus
      • EventFilterCategory
      • EventLogEntry
      • GameViewCapture
      • IScyllaShaderProvider
      • ScyllaAboutWindow
      • ScyllaBootstrapEditor
      • ScyllaCard
      • ScyllaConfigurationEditorBase
      • ScyllaCopyMenu
      • ScyllaCoreConfigurationEditor
      • ScyllaCoreDependencyProvider
      • ScyllaCoreShaderProvider
      • ScyllaDebugWindow
      • ScyllaDependencyDetector
      • ScyllaDependencyGraphElement
      • ScyllaDependencyInfo
      • ScyllaDescriptionBox
      • ScyllaEditorAssetUtil
      • ScyllaEditorAssets
      • ScyllaEditorBase
      • ScyllaEditorClipboard
      • ScyllaEditorColors
      • ScyllaEditorConstants
      • ScyllaEditorIconNames
      • ScyllaEditorLogScope
      • ScyllaEditorPrefs
      • ScyllaEditorStyles
      • ScyllaEditorTheme
      • ScyllaEditorUSSClasses
      • ScyllaEventConfigurationEditor
      • ScyllaFontCharacterExtractorWindow
      • ScyllaGettingStartedWindow
      • ScyllaIconPreview
      • ScyllaLoggerConfigurationEditor
      • ScyllaLogoElement
      • ScyllaMenuItems
      • ScyllaModuleEditor
      • ScyllaModuleStatusIndicator
      • ScyllaModuleWindow
      • ScyllaNameField
      • ScyllaPanel
      • ScyllaPresetSelector
      • ScyllaSceneConfigurationEditor
      • ScyllaScheduler
      • ScyllaSearchField
      • ScyllaSearchablePopup
      • ScyllaSearchablePopup.Item
      • ScyllaSettingsProvider
      • ScyllaSetupWizard
      • ScyllaShaderInclusionBuildProcessor
      • ScyllaSplitView
      • ScyllaStatusBar
      • ScyllaTabBar
      • ScyllaTimeConfigurationEditor
      • ScyllaToolWindowBase
      • ScyllaToolbar
      • ScyllaValidatedTextField
      • ScyllaWizardWindowBase
      • ScyllaWizardWindowBase.WizardLayout
      • ScyllaWizardWindowBase.WizardStepDef
    • Scylla.Core.Editor.Attributes
      • AttributeReflectionCache
      • ConditionalDrawerBase
      • DisableIfDrawer
      • EnableIfDrawer
      • FoldoutDrawer
      • HideIfDrawer
      • HorizontalLineDrawer
      • InfoBoxDrawer
      • LayerFieldDrawer
      • MinMaxRangeDrawer
      • MonoTextAreaDrawer
      • ReadOnlyDrawer
      • RequiredDrawer
      • SceneFieldDrawer
      • SerializedPropertyExtensions
      • ShowIfDrawer
      • SortingLayerFieldDrawer
      • TagFieldDrawer
      • TitleDrawer
    • Scylla.Core.Editor.Drawers
      • DoubleRangeDrawer
      • FloatRangeDrawer
      • IntRangeDrawer
    • Scylla.Core.Editor.Util.UI.Layout
      • ScyllaUIEdgeInsetsDrawer
      • ScyllaUILayoutMenuItems
      • ScyllaUILengthDrawer
    • Scylla.Core.Events
      • IScyllaEventBus
      • ScyllaEvent
      • ScyllaEventBus
      • ScyllaEventPriority
      • ScyllaEventSubscription
      • ScyllaEvents
      • ScyllaFrameworkInitializedEvent
      • ScyllaFrameworkShutdownEvent
      • ScyllaModuleShutdownEvent
      • ScyllaModuleStartedEvent
    • Scylla.Core.Modules
      • IScyllaModule
      • IScyllaModuleManager
      • ScyllaModule
      • ScyllaModuleDependency
      • ScyllaModuleDependencyType
      • ScyllaModuleException
      • ScyllaModuleID
      • ScyllaModuleInfo
      • ScyllaModuleManager
      • ScyllaModulePlacement
      • ScyllaModuleState
    • Scylla.Core.Scenes
      • HygieneOverride
      • SceneLoadOperation
      • SceneLoadRunner
      • SceneLoadState
      • ScyllaActiveSceneChangedEvent
      • ScyllaSceneConfiguration
      • ScyllaSceneLoadOptions
      • ScyllaSceneLoadProgressEvent
      • ScyllaSceneLoadedEvent
      • ScyllaSceneManager
      • ScyllaSceneUnloadedEvent
      • ScyllaSceneWillLoadEvent
      • ScyllaSceneWillUnloadEvent
    • Scylla.Core.Settings
      • ScyllaProjectSettings
    • Scylla.Core.Structures
      • FractionalHexCoord
      • GridUtil
      • HexCoord
      • HexCornerCoord
      • HexCornerMap<TData>
      • HexCornerMap<TData>.Enumerator
      • HexCornerPosition
      • HexEdgeCoord
      • HexEdgeDirection
      • HexEdgeMap<TData>
      • HexEdgeMap<TData>.Enumerator
      • HexGridLayout
      • HexLayoutMode
      • HexOrientation
      • IScyllaCollection
      • IScyllaCollection<T>
      • IScyllaGraph
      • IScyllaGrid<TCoord, TCell>
      • IScyllaMap<TKey, TValue>
      • IScyllaMutableGraph
      • IScyllaMutableGraph<TNodeData>
      • IScyllaMutableGraph<TNodeData, TEdgeData>
      • IScyllaPausableState<TContext>
      • IScyllaPriorityQueueItem
      • IScyllaReadOnlyGraph
      • IScyllaReadOnlyGraph<TNodeData>
      • IScyllaReadOnlyGraph<TNodeData, TEdgeData>
      • IScyllaState<TContext>
      • IScyllaTransition<TContext>
      • IScyllaTrie
      • IScyllaTrie<TValue>
      • NeighborWriter<TCoord>
      • ScyllaAABB2
      • ScyllaAABB3
      • ScyllaAdjacencyListGraph
      • ScyllaAdjacencyListGraph.Builder
      • ScyllaAdjacencyListGraph.NodeEnumerator
      • ScyllaAdjacencyListGraph.SynchronizedScyllaAdjacencyListGraph
      • ScyllaAdjacencyListGraph<TNodeData>
      • ScyllaAdjacencyListGraph<TNodeData, TEdgeData>
      • ScyllaBVH
      • ScyllaBVH.Builder
      • ScyllaBVHCore
      • ScyllaBitArray
      • ScyllaBitArray.Builder
      • ScyllaBitArray.Enumerator
      • ScyllaBitArray.SynchronizedScyllaBitArray
      • ScyllaBitArrayDOTS
      • ScyllaBitArrayDOTS.Builder
      • ScyllaBitArrayDOTS.Enumerator
      • ScyllaCSRGraph
      • ScyllaCSRGraph.Builder
      • ScyllaCSRGraph<TNodeData>
      • ScyllaCSRGraph<TNodeData, TEdgeData>
      • ScyllaCollectionCapabilities
      • ScyllaCollectionThreadSafety
      • ScyllaCompositeState<TContext>
      • ScyllaDequeDOTS<T>
      • ScyllaDequeDOTS<T>.Builder
      • ScyllaDeque<T>
      • ScyllaDeque<T>.Builder
      • ScyllaDeque<T>.Enumerator
      • ScyllaDeque<T>.SynchronizedScyllaDeque
      • ScyllaDisjointSet
      • ScyllaDisjointSet.Builder
      • ScyllaDisjointSet.SynchronizedScyllaDisjointSet
      • ScyllaDisjointSetDOTS
      • ScyllaDisjointSetDOTS.Builder
      • ScyllaGenericObjectPool<T>
      • ScyllaGenericObjectPool<T>.Builder
      • ScyllaGenericObjectPool<T>.Enumerator
      • ScyllaGenericObjectPool<T>.SynchronizedScyllaGenericObjectPool
      • ScyllaGraphAlgorithms
      • ScyllaGraphDOTS
      • ScyllaGraphDOTS.Builder
      • ScyllaGraphEdge
      • ScyllaGraphEdge<TEdgeData>
      • ScyllaGraphNode
      • ScyllaGraphNodeFlags
      • ScyllaGraphPath
      • ScyllaGraphProperties
      • ScyllaGraphSearchState
      • ScyllaGridGraphAdapter<TCoord, TCell>
      • ScyllaHexGrid<TCell>
      • ScyllaHexGrid<TCell>.Builder
      • ScyllaHexGrid<TCell>.Enumerator
      • ScyllaHexGrid<TCell>.SynchronizedScyllaHexGrid
      • ScyllaHierarchicalStateMachine<TContext>
      • ScyllaKDTree3
      • ScyllaKDTree3.Builder
      • ScyllaKDTree3Core
      • ScyllaKDTree3Core.Node
      • ScyllaLayeredStateMachine<TContext>
      • ScyllaLooseOctree
      • ScyllaLooseOctree.Builder
      • ScyllaLooseOctreeCore
      • ScyllaLooseOctreeUtil
      • ScyllaLooseOctree<T>
      • ScyllaLooseQuadtree
      • ScyllaLooseQuadtree.Builder
      • ScyllaLooseQuadtreeCore
      • ScyllaLooseQuadtreeUtil
      • ScyllaLooseQuadtree<T>
      • ScyllaMapDOTS<TKey, TValue>
      • ScyllaMapDOTS<TKey, TValue>.Builder
      • ScyllaMapEntry<TKey, TValue>
      • ScyllaMap<TKey, TValue>
      • ScyllaMap<TKey, TValue>.Builder
      • ScyllaMap<TKey, TValue>.Enumerator
      • ScyllaMap<TKey, TValue>.SynchronizedScyllaMap
      • ScyllaObjectPool<T>
      • ScyllaObjectPool<T>.Builder
      • ScyllaObjectPool<T>.Enumerator
      • ScyllaObjectPool<T>.SynchronizedScyllaObjectPool
      • ScyllaPausableStateBase<TContext>
      • ScyllaPriorityQueueDOTS<TValue>
      • ScyllaPriorityQueueDOTS<TValue>.Builder
      • ScyllaPriorityQueueItemComparer<T>
      • ScyllaPriorityQueueNode<TValue>
      • ScyllaPriorityQueueOrder
      • ScyllaPriorityQueue<T>
      • ScyllaPriorityQueue<T>.Builder
      • ScyllaPriorityQueue<T>.Enumerator
      • ScyllaPriorityQueue<T>.SynchronizedScyllaPriorityQueue
      • ScyllaPushdownStateMachine<TContext>
      • ScyllaQuadtreePlane
      • ScyllaQueueDOTS<T>
      • ScyllaQueueDOTS<T>.Builder
      • ScyllaQueue<T>
      • ScyllaQueue<T>.Builder
      • ScyllaQueue<T>.Enumerator
      • ScyllaQueue<T>.SynchronizedScyllaQueue
      • ScyllaRay3
      • ScyllaRingBufferDOTS<T>
      • ScyllaRingBufferDOTS<T>.Builder
      • ScyllaRingBufferDOTS<T>.Enumerator
      • ScyllaRingBufferDOTS<T>.ReverseEnumerable
      • ScyllaRingBufferDOTS<T>.ReverseEnumerator
      • ScyllaRingBuffer<T>
      • ScyllaRingBuffer<T>.Builder
      • ScyllaRingBuffer<T>.Enumerator
      • ScyllaRingBuffer<T>.ReverseEnumerable
      • ScyllaRingBuffer<T>.ReverseEnumerator
      • ScyllaRingBuffer<T>.SynchronizedScyllaRingBuffer
      • ScyllaSparseHexGrid<TCell>
      • ScyllaSparseHexGrid<TCell>.Builder
      • ScyllaSparseHexGrid<TCell>.Enumerator
      • ScyllaSparseHexGrid<TCell>.SynchronizedScyllaSparseHexGrid
      • ScyllaSparseSquareGrid<TCell>
      • ScyllaSparseSquareGrid<TCell>.Builder
      • ScyllaSparseSquareGrid<TCell>.Enumerator
      • ScyllaSparseSquareGrid<TCell>.SynchronizedScyllaSparseSquareGrid
      • ScyllaSparseTriGrid<TCell>
      • ScyllaSparseTriGrid<TCell>.Builder
      • ScyllaSparseTriGrid<TCell>.Enumerator
      • ScyllaSparseTriGrid<TCell>.SynchronizedScyllaSparseTriGrid
      • ScyllaSquareGrid<TCell>
      • ScyllaSquareGrid<TCell>.Builder
      • ScyllaSquareGrid<TCell>.Enumerator
      • ScyllaSquareGrid<TCell>.SynchronizedScyllaSquareGrid
      • ScyllaStackDOTS<T>
      • ScyllaStackDOTS<T>.Builder
      • ScyllaStack<T>
      • ScyllaStack<T>.Builder
      • ScyllaStack<T>.Enumerator
      • ScyllaStack<T>.SynchronizedScyllaStack
      • ScyllaStateBase<TContext>
      • ScyllaStateMachine<TContext>
      • ScyllaTransition<TContext>
      • ScyllaTriGrid<TCell>
      • ScyllaTriGrid<TCell>.Builder
      • ScyllaTriGrid<TCell>.Enumerator
      • ScyllaTriGrid<TCell>.SynchronizedScyllaTriGrid
      • ScyllaTrie
      • ScyllaTrie.Builder
      • ScyllaTrie.SynchronizedScyllaTrie
      • ScyllaTrie<TValue>
      • ScyllaTrie<TValue>.Builder
      • ScyllaTrie<TValue>.SynchronizedScyllaTrie
      • ScyllaTypeMap
      • ScyllaTypeMap.Builder
      • ScyllaTypeMap.DiagnosticEntry
      • ScyllaTypeMap.SynchronizedScyllaTypeMap
      • SerializableDictionary<TKey, TValue>
      • SquareAdjacency
      • SquareCoord
      • SquareCornerCoord
      • SquareCornerMap<TData>
      • SquareCornerMap<TData>.Enumerator
      • SquareDistanceMetric
      • SquareEdgeCoord
      • SquareEdgeDirection
      • SquareEdgeMap<TData>
      • SquareEdgeMap<TData>.Enumerator
      • SquareGridLayout
      • TriCoord
      • TriCornerCoord
      • TriCornerMap<TData>
      • TriCornerMap<TData>.Enumerator
      • TriEdgeCoord
      • TriEdgeDirection
      • TriEdgeMap<TData>
      • TriEdgeMap<TData>.Enumerator
      • TriGridLayout
    • Scylla.Core.Time
      • CalendarDefinition
      • CalendarMath
      • ClockDayChangedEvent
      • ClockDebugInfo
      • ClockDefinition
      • ClockEraChangedEvent
      • ClockEvent
      • ClockEventKind
      • ClockHourChangedEvent
      • ClockMinuteChangedEvent
      • ClockMonthChangedEvent
      • ClockPausedEvent
      • ClockRegisteredEvent
      • ClockResumedEvent
      • ClockSeasonChangedEvent
      • ClockSecondChangedEvent
      • ClockState
      • ClockTickEvent
      • ClockTimeScaleChangedEvent
      • ClockUnregisteredEvent
      • ClockWeekdayChangedEvent
      • ClockYearChangedEvent
      • EraDefinition
      • GameDate
      • IClockListener
      • IClockSource
      • IEraConditionProvider
      • ILocationProfile
      • INetworkTimeSyncStrategy
      • ITimeListener
      • LeapYearRule
      • MasterTimeState
      • MonthDefinition
      • PauseMode
      • ScheduleExtensions
      • ScheduleMode
      • ScheduledTickHandle
      • ScyllaClock
      • ScyllaTime
      • ScyllaTimeConfiguration
      • ScyllaTimeDebugInfo
      • SeasonDefinition
      • SmoothTimeScaleTransition
      • TimeEffectHandle
      • TimeEffects
      • TimeEvent
      • TimeScaleBlendMode
      • TimeScaleModifier
      • TimeScaleModifierHandle
      • TimeScaleModifierStack
      • TimeScaleModifierState
      • TimeTickRunner
      • WeekdayDefinition
    • Scylla.Core.Util
      • ArrayUtil
      • AssemblyUtil
      • CameraUtil
      • CollectionUtil
      • ColorUtil
      • ComponentUtil
      • DateUtil
      • DebugCamera
      • FontUtil
      • FontVariant
      • GameObjectExtensions
      • GameObjectUtil
      • InterfaceUtil
      • Interpolation
      • LightUtil
      • LitMaterialDescriptor
      • ManualResetEventEx
      • MaterialUtil
      • NumberExtensions
      • NumberUtil
      • OptionalPackages
      • PlatformUtil
      • ResourceUtil
      • SpriteUtil
      • StringUtil
      • TabularText
      • TabularText.Builder
      • TestTextGenerator
      • ThreadUtil
      • TimeUtil
      • Timer
      • TransformExtensions
      • TypeUtil
      • UnicodeRange
      • VirtualTransform
    • Scylla.Core.Util.Addressables
      • AddressableErrorCode
      • AddressableException
      • AddressableExtensions
      • AddressableProgress
      • AddressableResult
      • AddressableResult<T>
      • AddressableSettings
      • ManagedAddressableList<T>
      • ManagedAddressable<T>
      • ScyllaAddressables
    • Scylla.Core.Util.Checksum
      • ChecksumAdler32
      • ChecksumCRC16
      • ChecksumCRC32
      • ChecksumFletcher32
      • ChecksumXXHash32
      • ChecksumXXHash64
      • IChecksum
    • Scylla.Core.Util.Compression
      • ArchiveEntryInfo
      • CompressionAlgorithm
      • CompressionErrorCode
      • CompressionException
      • CompressionExtensions
      • CompressionLevel
      • CompressionProgress
      • CompressionResult
      • CompressionResult<T>
      • CompressionSettings
      • IArchiveProvider
      • ICompressionProvider
      • ScyllaCompression
    • Scylla.Core.Util.Crypto
      • CryptoAlgorithm
      • CryptoErrorCode
      • CryptoException
      • CryptoExtensions
      • CryptoSettings
      • ICryptoProvider
      • KeyDerivationHash
      • KeyDerivationSettings
      • ScyllaCrypto
    • Scylla.Core.Util.DebugDraw
      • DebugDraw
      • DebugDrawSpace
      • DebugDrawTextAlign
    • Scylla.Core.Util.Effects
      • ColorAnimationText
      • ColorAnimationTextDirection
      • ColorAnimationTextGradient
    • Scylla.Core.Util.File
      • ConfigFile
      • ConfigFileGroup
      • ConfigFileProperty
      • ConfigFilePropertyType
      • ConfigFileUtil
      • FileErrorCode
      • FileException
      • FileExtensions
      • FilePathExtensions
      • FilePathUtil
      • FileProgress
      • FileSettings
      • ImageFileFormat
      • ImageFileSettings
      • ScyllaFileUtil
    • Scylla.Core.Util.Geom
      • AABB3D
      • BarrelColoringMode
      • BollardColoringMode
      • CappedWallColoringMode
      • Capsule3D
      • ColliderMode
      • CrateColoringMode
      • Ellipse
      • FaceColoringMode
      • IFaceColorResolver
      • OBB3D
      • PaletteFaceColorResolver
      • PaneledWall1ColoringMode
      • PaneledWall2ColoringMode
      • PipeSegmentColoringMode
      • RoundedBoxColoringMode
      • ScyllaArchwayShape
      • ScyllaBarrelShape
      • ScyllaBollardShape
      • ScyllaBoxShape
      • ScyllaCappedWallShape
      • ScyllaCapsuleShape
      • ScyllaColumnShape
      • ScyllaConeShape
      • ScyllaCrateShape
      • ScyllaCurvedStairsShape
      • ScyllaCylinderShape
      • ScyllaDomeShape
      • ScyllaFloorTileShape
      • ScyllaIcoSphereShape
      • ScyllaLadderShape
      • ScyllaLinearStairsShape
      • ScyllaOctahedronShape
      • ScyllaPaneledWall1Shape
      • ScyllaPaneledWall2Shape
      • ScyllaPipeSegmentShape
      • ScyllaPipeShape
      • ScyllaPlaneShape
      • ScyllaPyramidShape
      • ScyllaQuadShape
      • ScyllaRampShape
      • ScyllaRingShape
      • ScyllaRoundedBoxShape
      • ScyllaShapeBase3D
      • ScyllaShapes
      • ScyllaShelvedWallShape
      • ScyllaSignShape
      • ScyllaSkirtedWallShape
      • ScyllaSkyDomeShape
      • ScyllaSphereShape
      • ScyllaSpiralStairsShape
      • ScyllaTorusShape
      • ScyllaTriangularPrismShape
      • ScyllaWallShape
      • ScyllaWallWithDoorShape
      • ScyllaWallWithWindowShape
      • ShapeMaterialCache
      • ShelvedWallColoringMode
      • SignColoringMode
      • Size2D
      • Size3D
      • SkirtedWallColoringMode
      • Sphere3D
      • StairsColoringMode
      • UniformColorResolver
    • Scylla.Core.Util.Math
      • Complex
      • MathUtil
      • Monomial
      • Polynomial
    • Scylla.Core.Util.Noise
      • CellularDistanceType
      • CellularReturnType
      • CellularSettings
      • FractalType
      • NoiseAlgorithm
      • NoiseCurlSampler
      • NoiseDomainWarper
      • NoiseGenerator
      • NoiseSettings
      • PixelNoise
      • PixelNoiseDistribution
      • PixelNoiseSettings
      • WarpSettings
    • Scylla.Core.Util.Palette
      • ColorAssetRegistry
      • ColorGradient
      • ColorGradientAlphaStop
      • ColorGradientAlphaStopData
      • ColorGradientAsset
      • ColorGradientColorSpace
      • ColorGradientData
      • ColorGradientMode
      • ColorGradientStop
      • ColorGradientStopData
      • ColorGradientStopInterpolation
      • ColorPalette
      • ColorPaletteAsset
      • ColorPaletteData
      • ColorPaletteEntry
      • ColorPaletteEntryData
      • ColorPaletteMapping
      • ColorRole
      • ColorStopBlendMode
      • ColorSwatchCollection
      • ColorSwatchCollectionAsset
      • ColorSwatchCollectionData
      • ColorSwatchEntryData
      • MutableColorGradient
      • MutableColorPalette
    • Scylla.Core.Util.ProceduralMapGen
      • BSPSettings
      • CellularAutomataSettings
      • CorridorStyle
      • DoorAxis
      • DoorPlacement
      • DoorPlacementSettings
      • DoorShapeConfig
      • DrunkardWalkSettings
      • FloorplanSettings
      • InstantiationResult
      • MapCellType
      • MapCorridor<TCoord>
      • MapGenResult<TCoord>
      • MapGenSettings
      • MapOverlaySettings
      • MapPatternType
      • MapRoom<TCoord>
      • MazeRoomSettings
      • MazeSettings
      • NoiseThresholdSettings
      • ProceduralMapGenerator
      • ProceduralMapOverlay
      • ProceduralMapPostProcessor
      • RoomCorridorSettings
      • RoomGroup
      • ScyllaProceduralMapInstantiator
      • VoronoiRegionSettings
      • WindingCorridorSettings
    • Scylla.Core.Util.Random
      • AliasTable
      • CryptoRandomSource
      • DiceRoll
      • IProbabilityInfluence
      • IRandomSource
      • MersenneTwister
      • MersenneTwisterState
      • PCG32
      • PCG32State
      • PickHistory
      • PickRecord
      • PoissonDiskSampler
      • PoissonDiskSampler.BoundChecker
      • ProbabilityEntry<T>
      • ProbabilityList<T>
      • ProbabilityNormalizer
      • RandomAlgorithm
      • RandomExtensions
      • RandomID
      • RandomSeeder
      • RandomText
      • RandomUtil
      • RandomUtil.DeterministicRNG
      • RandomUtil.DeterministicRNGState
      • RepeatPreventionMode
      • SelectionStrategy
      • SplitMix64RNG
      • SplitMix64State
      • SystemRandomSource
      • UnityRandomSource
      • Xoroshiro128Plus
      • Xoroshiro128State
      • Xoshiro256StarStar
      • Xoshiro256State
    • Scylla.Core.Util.Ranges
      • DoubleRange
      • FloatRange
      • IntRange
    • Scylla.Core.Util.Serialization
      • ArraySerializer<T>
      • BoolSerializer
      • BoundsSerializer
      • ByteArraySerializer
      • ByteSerializer
      • CharSerializer
      • Color32Serializer
      • ColorSerializer
      • DateTimeOffsetSerializer
      • DateTimeSerializer
      • DecimalSerializer
      • DefaultValueHandling
      • DictionarySerializer<TKey, TValue>
      • DoubleSerializer
      • EnumSerializer<T>
      • FloatSerializer
      • GuidSerializer
      • HashSetSerializer<T>
      • IScyllaReader
      • IScyllaWriter
      • ISerializationContext
      • ITypeSerializer
      • ITypeSerializer<T>
      • IntSerializer
      • LayerMaskSerializer
      • ListSerializer<T>
      • LongSerializer
      • NullHandling
      • PropertyMetadata
      • QuaternionSerializer
      • QueueSerializer<T>
      • RectIntSerializer
      • RectSerializer
      • ReferenceHandling
      • ReferenceTracker
      • ReflectionSerializer
      • SByteSerializer
      • ScyllaIgnoreAttribute
      • ScyllaIncludeAttribute
      • ScyllaJSONReader
      • ScyllaJSONWriter
      • ScyllaMigrationAttribute
      • ScyllaPropertyAttribute
      • ScyllaSerializableAttribute
      • ScyllaSerialization
      • SerializationContext
      • SerializationEngine
      • SerializationException
      • SerializationFormat
      • SerializationResult
      • SerializationResult<T>
      • SerializationSettings
      • SerializationSettings.Builder
      • SerializationToken
      • ShortSerializer
      • StackSerializer<T>
      • StringSerializer
      • TimeSpanSerializer
      • TypeMetadata
      • TypeMetadataCache
      • TypeSerializerAdapter<T>
      • TypeSerializerBase<T>
      • UIntSerializer
      • ULongSerializer
      • UShortSerializer
      • Vector2IntSerializer
      • Vector2Serializer
      • Vector3IntSerializer
      • Vector3Serializer
      • Vector4Serializer
    • Scylla.Core.Util.Tween
      • Ease
      • EaseType
      • ITween
      • LoopType
      • ScyllaShapeTweenExtensions
      • ScyllaTween
      • SequenceItem
      • SequenceItemType
      • TweenAudioSourceExtensions
      • TweenBase
      • TweenCanvasGroupExtensions
      • TweenColor
      • TweenErrorCode
      • TweenException
      • TweenExtensions
      • TweenFloat
      • TweenID
      • TweenLerp
      • TweenManager
      • TweenMaterialExtensions
      • TweenPool
      • TweenQuaternion
      • TweenRectTransformExtensions
      • TweenSequence
      • TweenSettings
      • TweenSpriteRendererExtensions
      • TweenState
      • TweenTransformExtensions
      • TweenVector2
      • TweenVector3
      • TweenVector4
      • Tween<T>
    • Scylla.Core.Util.UI
      • DebugCanvasUtil
      • GradientBackground
      • IUIText
      • IUITextField
      • LineScrollTextArea
      • LineScrollTextAreaBuilder
      • LineScrollTextBuffer
      • LineScrollTextBuffer.Builder
      • LineScrollTextBuffer.LogicalLine
      • LineScrollTextBufferLineAddedEvent
      • LineScrollTextBufferScrolledEvent
      • LineScrollWindow
      • LineScrollWindow.Enumerator
      • ScrollDirection
      • ScrollPhysics
      • ScrollTextArea
      • ScrollTextAreaBuilder
      • ScrollTextAreaDragEndedEvent
      • ScrollTextAreaDragStartedEvent
      • ScrollTextAreaScrolledEvent
      • ScrollTextBuffer
      • ScrollTextBuffer.Builder
      • ScrollTextBuffer.ScrollTextLine
      • ScrollTextBufferLineAddedEvent
      • ScrollTextLineView
      • ScyllaScrollRect
      • ScyllaUIAdaptiveStack
      • ScyllaUIAlignment
      • ScyllaUIAspectBreakpoint
      • ScyllaUICrossAlignment
      • ScyllaUIEdgeInsets
      • ScyllaUIFitMode
      • ScyllaUIFlexElement
      • ScyllaUIGrid
      • ScyllaUIGridItem
      • ScyllaUIHStack
      • ScyllaUILayoutAnimator
      • ScyllaUILayoutDebugDraw
      • ScyllaUILayoutDebugDrawConfig
      • ScyllaUILayoutGizmos
      • ScyllaUILayoutRoot
      • ScyllaUILayoutStyle
      • ScyllaUILength
      • ScyllaUILengthUnit
      • ScyllaUIPositioned
      • ScyllaUIScreenMargin
      • ScyllaUISizeMode
      • ScyllaUISpacer
      • ScyllaUIStackBase
      • ScyllaUIText
      • ScyllaUITextGroup
      • ScyllaUITrack
      • ScyllaUITrackSizingMode
      • ScyllaUIVStack
      • ScyllaUIZStack
      • TMPSettings
      • TMPUtil
      • TextSelectionPosition
      • TextSelectionRange
      • UIAlignment
      • UIAnchor
      • UIAnchors
      • UIFontReference
      • UIFontStyle
      • UIMargin
      • UIPadding
      • UITextBuilder
      • UITextComponent
      • UITextFactory
      • UITextFieldBuilder
      • UITextFieldComponent
      • UIUtil
      • VisualLine
    • Scylla.Core.Util.Units
      • AreaUnit
      • DataUnit
      • LengthUnit
      • MassUnit
      • PressureUnit
      • SpeedUnit
      • TemperatureUnit
      • TimeFormat
      • TimeUnit

    Class NumberExtensions

    Provides extension methods for numeric types that expose the static methods of NumberUtil in a fluent, instance-method style. This allows chained usage on literals and local variables without requiring the full NumberUtil.Method(value, ...) call syntax.

    Inheritance
    object
    NumberExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Scylla.Core.Util
    Assembly: ScyllaCore.dll
    Syntax
    public static class NumberExtensions
    Remarks

    All methods delegate directly to their counterpart in NumberUtil and carry identical semantics. Consult the documentation on each NumberUtil method for full details, including edge cases and special floating-point handling.

    Covered categories:

    • Clamp / Range: Clamp, Clamp01, IsBetween
    • Float hygiene: Approximately, IsNearlyZero
    • Rounding / Snapping: RoundToDecimals, Snap
    • Modulo / Wrap: Mod, Repeat, Wrap

    Methods

    Approximately(double, double, double)

    Returns true if the absolute difference between this float and other is less than or equal to epsilon. Use this instead of the == operator when comparing floats that may accumulate rounding error. The default epsilon is EPSILON (1e-6).

    Declaration
    public static bool Approximately(this double value, double other, double epsilon = 1E-12)
    Parameters
    Type Name Description
    double value
    double other
    double epsilon

    The maximum difference allowed for the two numbers to be considered equal. Defaults to EPSILON.

    Returns
    Type Description
    bool

    true if the absolute difference between a and b is less than or equal to epsilon; otherwise, false.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if epsilon is negative.

    Approximately(float, float, float)

    Returns true if the absolute difference between this float and other is less than or equal to epsilon. Use this instead of the == operator when comparing floats that may accumulate rounding error. The default epsilon is EPSILON (1e-6).

    Declaration
    public static bool Approximately(this float value, float other, float epsilon = 1E-06)
    Parameters
    Type Name Description
    float value
    float other
    float epsilon

    The maximum difference allowed for the two numbers to be considered equal. Defaults to EPSILON.

    Returns
    Type Description
    bool

    true if the absolute difference between a and b is less than or equal to epsilon; otherwise, false.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if epsilon is negative.

    Clamp(decimal, decimal, decimal)

    Clamps this int value to the inclusive range [min, max]. When min is greater than max, the behavior is undefined and may return an out-of-range value.

    Declaration
    public static decimal Clamp(this decimal value, decimal min, decimal max)
    Parameters
    Type Name Description
    decimal value

    The value to clamp.

    decimal min

    The inclusive lower bound of the range.

    decimal max

    The inclusive upper bound of the range.

    Returns
    Type Description
    decimal

    The clamped value in the range [min, max].

    Exceptions
    Type Condition
    ArgumentException

    Thrown when min is greater than max.

    Clamp(double, double, double)

    Clamps this int value to the inclusive range [min, max]. When min is greater than max, the behavior is undefined and may return an out-of-range value.

    Declaration
    public static double Clamp(this double value, double min, double max)
    Parameters
    Type Name Description
    double value

    The value to clamp.

    double min

    The inclusive lower bound of the range.

    double max

    The inclusive upper bound of the range.

    Returns
    Type Description
    double

    The clamped value in the range [min, max].

    Exceptions
    Type Condition
    ArgumentException

    Thrown when min is greater than max.

    Clamp(int, int, int)

    Clamps this int value to the inclusive range [min, max]. When min is greater than max, the behavior is undefined and may return an out-of-range value.

    Declaration
    public static int Clamp(this int value, int min, int max)
    Parameters
    Type Name Description
    int value

    The value to clamp.

    int min

    The inclusive lower bound of the range.

    int max

    The inclusive upper bound of the range.

    Returns
    Type Description
    int

    The clamped value in the range [min, max].

    Exceptions
    Type Condition
    ArgumentException

    Thrown when min is greater than max.

    Clamp(long, long, long)

    Clamps this int value to the inclusive range [min, max]. When min is greater than max, the behavior is undefined and may return an out-of-range value.

    Declaration
    public static long Clamp(this long value, long min, long max)
    Parameters
    Type Name Description
    long value

    The value to clamp.

    long min

    The inclusive lower bound of the range.

    long max

    The inclusive upper bound of the range.

    Returns
    Type Description
    long

    The clamped value in the range [min, max].

    Exceptions
    Type Condition
    ArgumentException

    Thrown when min is greater than max.

    Clamp(float, float, float)

    Clamps this int value to the inclusive range [min, max]. When min is greater than max, the behavior is undefined and may return an out-of-range value.

    Declaration
    public static float Clamp(this float value, float min, float max)
    Parameters
    Type Name Description
    float value

    The value to clamp.

    float min

    The inclusive lower bound of the range.

    float max

    The inclusive upper bound of the range.

    Returns
    Type Description
    float

    The clamped value in the range [min, max].

    Exceptions
    Type Condition
    ArgumentException

    Thrown when min is greater than max.

    Clamp(uint, uint, uint)

    Clamps this int value to the inclusive range [min, max]. When min is greater than max, the behavior is undefined and may return an out-of-range value.

    Declaration
    public static uint Clamp(this uint value, uint min, uint max)
    Parameters
    Type Name Description
    uint value

    The value to clamp.

    uint min

    The inclusive lower bound of the range.

    uint max

    The inclusive upper bound of the range.

    Returns
    Type Description
    uint

    The clamped value in the range [min, max].

    Exceptions
    Type Condition
    ArgumentException

    Thrown when min is greater than max.

    Clamp(ulong, ulong, ulong)

    Clamps this int value to the inclusive range [min, max]. When min is greater than max, the behavior is undefined and may return an out-of-range value.

    Declaration
    public static ulong Clamp(this ulong value, ulong min, ulong max)
    Parameters
    Type Name Description
    ulong value

    The value to clamp.

    ulong min

    The inclusive lower bound of the range.

    ulong max

    The inclusive upper bound of the range.

    Returns
    Type Description
    ulong

    The clamped value in the range [min, max].

    Exceptions
    Type Condition
    ArgumentException

    Thrown when min is greater than max.

    Clamp01(double)

    Clamps this float value to the normalized range [0, 1]. Values below 0 are returned as 0; values above 1 are returned as 1.

    Declaration
    public static double Clamp01(this double value)
    Parameters
    Type Name Description
    double value

    The value to clamp.

    Returns
    Type Description
    double

    The clamped value, which will be within the range [0, 1].

    Clamp01(float)

    Clamps this float value to the normalized range [0, 1]. Values below 0 are returned as 0; values above 1 are returned as 1.

    Declaration
    public static float Clamp01(this float value)
    Parameters
    Type Name Description
    float value

    The value to clamp.

    Returns
    Type Description
    float

    The clamped value, which will be within the range [0, 1].

    IsBetween(decimal, decimal, decimal, bool)

    Returns true if this int value falls within the range defined by min and max. When inclusive is true (default), both endpoints are considered part of the range ([min, max]). When false, endpoints are excluded ((min, max)).

    Declaration
    public static bool IsBetween(this decimal value, decimal min, decimal max, bool inclusive = true)
    Parameters
    Type Name Description
    decimal value

    The value to evaluate.

    decimal min

    The lower boundary of the range.

    decimal max

    The upper boundary of the range.

    bool inclusive

    Specifies whether the boundaries are inclusive. If true, the range is inclusive of the boundaries; otherwise, the range is exclusive.

    Returns
    Type Description
    bool

    True if the value is within the specified range, otherwise false.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the min value is greater than the max value.

    IsBetween(double, double, double, bool)

    Returns true if this int value falls within the range defined by min and max. When inclusive is true (default), both endpoints are considered part of the range ([min, max]). When false, endpoints are excluded ((min, max)).

    Declaration
    public static bool IsBetween(this double value, double min, double max, bool inclusive = true)
    Parameters
    Type Name Description
    double value

    The value to evaluate.

    double min

    The lower boundary of the range.

    double max

    The upper boundary of the range.

    bool inclusive

    Specifies whether the boundaries are inclusive. If true, the range is inclusive of the boundaries; otherwise, the range is exclusive.

    Returns
    Type Description
    bool

    True if the value is within the specified range, otherwise false.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the min value is greater than the max value.

    IsBetween(int, int, int, bool)

    Returns true if this int value falls within the range defined by min and max. When inclusive is true (default), both endpoints are considered part of the range ([min, max]). When false, endpoints are excluded ((min, max)).

    Declaration
    public static bool IsBetween(this int value, int min, int max, bool inclusive = true)
    Parameters
    Type Name Description
    int value

    The value to evaluate.

    int min

    The lower boundary of the range.

    int max

    The upper boundary of the range.

    bool inclusive

    Specifies whether the boundaries are inclusive. If true, the range is inclusive of the boundaries; otherwise, the range is exclusive.

    Returns
    Type Description
    bool

    True if the value is within the specified range, otherwise false.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the min value is greater than the max value.

    IsBetween(long, long, long, bool)

    Returns true if this int value falls within the range defined by min and max. When inclusive is true (default), both endpoints are considered part of the range ([min, max]). When false, endpoints are excluded ((min, max)).

    Declaration
    public static bool IsBetween(this long value, long min, long max, bool inclusive = true)
    Parameters
    Type Name Description
    long value

    The value to evaluate.

    long min

    The lower boundary of the range.

    long max

    The upper boundary of the range.

    bool inclusive

    Specifies whether the boundaries are inclusive. If true, the range is inclusive of the boundaries; otherwise, the range is exclusive.

    Returns
    Type Description
    bool

    True if the value is within the specified range, otherwise false.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the min value is greater than the max value.

    IsBetween(float, float, float, bool)

    Returns true if this int value falls within the range defined by min and max. When inclusive is true (default), both endpoints are considered part of the range ([min, max]). When false, endpoints are excluded ((min, max)).

    Declaration
    public static bool IsBetween(this float value, float min, float max, bool inclusive = true)
    Parameters
    Type Name Description
    float value

    The value to evaluate.

    float min

    The lower boundary of the range.

    float max

    The upper boundary of the range.

    bool inclusive

    Specifies whether the boundaries are inclusive. If true, the range is inclusive of the boundaries; otherwise, the range is exclusive.

    Returns
    Type Description
    bool

    True if the value is within the specified range, otherwise false.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the min value is greater than the max value.

    IsBetween(uint, uint, uint, bool)

    Returns true if this int value falls within the range defined by min and max. When inclusive is true (default), both endpoints are considered part of the range ([min, max]). When false, endpoints are excluded ((min, max)).

    Declaration
    public static bool IsBetween(this uint value, uint min, uint max, bool inclusive = true)
    Parameters
    Type Name Description
    uint value

    The value to evaluate.

    uint min

    The lower boundary of the range.

    uint max

    The upper boundary of the range.

    bool inclusive

    Specifies whether the boundaries are inclusive. If true, the range is inclusive of the boundaries; otherwise, the range is exclusive.

    Returns
    Type Description
    bool

    True if the value is within the specified range, otherwise false.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the min value is greater than the max value.

    IsBetween(ulong, ulong, ulong, bool)

    Returns true if this int value falls within the range defined by min and max. When inclusive is true (default), both endpoints are considered part of the range ([min, max]). When false, endpoints are excluded ((min, max)).

    Declaration
    public static bool IsBetween(this ulong value, ulong min, ulong max, bool inclusive = true)
    Parameters
    Type Name Description
    ulong value

    The value to evaluate.

    ulong min

    The lower boundary of the range.

    ulong max

    The upper boundary of the range.

    bool inclusive

    Specifies whether the boundaries are inclusive. If true, the range is inclusive of the boundaries; otherwise, the range is exclusive.

    Returns
    Type Description
    bool

    True if the value is within the specified range, otherwise false.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the min value is greater than the max value.

    IsNearlyZero(double, double)

    Returns true if the absolute value of this float is less than or equal to epsilon. Equivalent to calling Approximately(value, 0f, epsilon). The default epsilon is EPSILON (1e-6).

    Declaration
    public static bool IsNearlyZero(this double value, double epsilon = 1E-12)
    Parameters
    Type Name Description
    double value

    The value to evaluate.

    double epsilon

    The permissible range for the value to be considered nearly zero. Must be greater than or equal to zero.

    Returns
    Type Description
    bool

    True if the value is within the specified epsilon range of zero; otherwise, false.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when the epsilon is negative.

    IsNearlyZero(float, float)

    Returns true if the absolute value of this float is less than or equal to epsilon. Equivalent to calling Approximately(value, 0f, epsilon). The default epsilon is EPSILON (1e-6).

    Declaration
    public static bool IsNearlyZero(this float value, float epsilon = 1E-06)
    Parameters
    Type Name Description
    float value

    The value to evaluate.

    float epsilon

    The permissible range for the value to be considered nearly zero. Must be greater than or equal to zero.

    Returns
    Type Description
    bool

    True if the value is within the specified epsilon range of zero; otherwise, false.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when the epsilon is negative.

    Mod(decimal, decimal)

    Computes a mathematically correct modulo of this float divided by m, always returning a non-negative result in [0, m). Unlike C#'s % operator, negative inputs produce a positive remainder.

    Declaration
    public static decimal Mod(this decimal value, decimal m)
    Parameters
    Type Name Description
    decimal value

    The value to compute the modulo for.

    decimal m

    The divisor, which must be greater than 0.

    Returns
    Type Description
    decimal

    The result of the modulo operation, always within the range [0, m).

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if m is less than or equal to 0.

    Mod(double, double)

    Computes a mathematically correct modulo of this float divided by m, always returning a non-negative result in [0, m). Unlike C#'s % operator, negative inputs produce a positive remainder.

    Declaration
    public static double Mod(this double value, double m)
    Parameters
    Type Name Description
    double value

    The value to compute the modulo for.

    double m

    The divisor, which must be greater than 0.

    Returns
    Type Description
    double

    The result of the modulo operation, always within the range [0, m).

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if m is less than or equal to 0.

    Mod(int, int)

    Computes a mathematically correct modulo of this int divided by m, always returning a non-negative result in [0, m). Unlike C#'s % operator, which returns a negative remainder for negative dividends, this method follows the mathematical definition: (-1).Mod(5) returns 4.

    Declaration
    public static int Mod(this int value, int m)
    Parameters
    Type Name Description
    int value

    The integer value to compute the modulo for.

    int m

    The divisor, which must be greater than 0.

    Returns
    Type Description
    int

    The result of the modulo operation, always in the range [0, m).

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when m is less than or equal to 0.

    Mod(long, long)

    Computes a mathematically correct modulo of this int divided by m, always returning a non-negative result in [0, m). Unlike C#'s % operator, which returns a negative remainder for negative dividends, this method follows the mathematical definition: (-1).Mod(5) returns 4.

    Declaration
    public static long Mod(this long value, long m)
    Parameters
    Type Name Description
    long value

    The integer value to compute the modulo for.

    long m

    The divisor, which must be greater than 0.

    Returns
    Type Description
    long

    The result of the modulo operation, always in the range [0, m).

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when m is less than or equal to 0.

    Mod(float, float)

    Computes a mathematically correct modulo of this float divided by m, always returning a non-negative result in [0, m). Unlike C#'s % operator, negative inputs produce a positive remainder.

    Declaration
    public static float Mod(this float value, float m)
    Parameters
    Type Name Description
    float value

    The value to compute the modulo for.

    float m

    The divisor, which must be greater than 0.

    Returns
    Type Description
    float

    The result of the modulo operation, always within the range [0, m).

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if m is less than or equal to 0.

    Repeat(double, double)

    Loops this float so that it always falls within [0, length). When the value equals or exceeds length, it wraps back to near zero. This is analogous to a sawtooth function and is useful for cyclic animations, texture tiling offsets, and angle wrapping. Negative inputs also wrap correctly into the positive range.

    Declaration
    public static double Repeat(this double value, double length)
    Parameters
    Type Name Description
    double value
    double length

    The length of the range. Must be greater than 0.

    Returns
    Type Description
    double

    A value in the range [0, length).

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if length is less than or equal to 0.

    Repeat(float, float)

    Loops this float so that it always falls within [0, length). When the value equals or exceeds length, it wraps back to near zero. This is analogous to a sawtooth function and is useful for cyclic animations, texture tiling offsets, and angle wrapping. Negative inputs also wrap correctly into the positive range.

    Declaration
    public static float Repeat(this float value, float length)
    Parameters
    Type Name Description
    float value
    float length

    The length of the range. Must be greater than 0.

    Returns
    Type Description
    float

    A value in the range [0, length).

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if length is less than or equal to 0.

    RoundToDecimals(decimal, int)

    Rounds this float to decimals decimal places using midpoint-rounding-away-from-zero semantics. Passing 0 rounds to the nearest whole number; negative values for decimals are not supported and may produce unexpected results.

    Declaration
    public static decimal RoundToDecimals(this decimal value, int decimals)
    Parameters
    Type Name Description
    decimal value

    The float value to round.

    int decimals

    The number of decimal places to round to. Must be greater than or equal to zero.

    Returns
    Type Description
    decimal

    The rounded float value.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when decimals is negative.

    RoundToDecimals(double, int)

    Rounds this float to decimals decimal places using midpoint-rounding-away-from-zero semantics. Passing 0 rounds to the nearest whole number; negative values for decimals are not supported and may produce unexpected results.

    Declaration
    public static double RoundToDecimals(this double value, int decimals)
    Parameters
    Type Name Description
    double value

    The float value to round.

    int decimals

    The number of decimal places to round to. Must be greater than or equal to zero.

    Returns
    Type Description
    double

    The rounded float value.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when decimals is negative.

    RoundToDecimals(float, int)

    Rounds this float to decimals decimal places using midpoint-rounding-away-from-zero semantics. Passing 0 rounds to the nearest whole number; negative values for decimals are not supported and may produce unexpected results.

    Declaration
    public static float RoundToDecimals(this float value, int decimals)
    Parameters
    Type Name Description
    float value

    The float value to round.

    int decimals

    The number of decimal places to round to. Must be greater than or equal to zero.

    Returns
    Type Description
    float

    The rounded float value.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when decimals is negative.

    Snap(decimal, decimal)

    Rounds this float to the nearest multiple of step. Useful for grid snapping, quantizing audio levels, or aligning values to fixed increments. For example, 1.7f.Snap(0.5f) returns 1.5f.

    Declaration
    public static decimal Snap(this decimal value, decimal step)
    Parameters
    Type Name Description
    decimal value

    The value to be rounded.

    decimal step

    The step size to which the value will be rounded. Must be greater than 0.

    Returns
    Type Description
    decimal

    The rounded value, as a multiple of the specified step.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if the step is less than or equal to 0.

    Snap(double, double)

    Rounds this float to the nearest multiple of step. Useful for grid snapping, quantizing audio levels, or aligning values to fixed increments. For example, 1.7f.Snap(0.5f) returns 1.5f.

    Declaration
    public static double Snap(this double value, double step)
    Parameters
    Type Name Description
    double value

    The value to be rounded.

    double step

    The step size to which the value will be rounded. Must be greater than 0.

    Returns
    Type Description
    double

    The rounded value, as a multiple of the specified step.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if the step is less than or equal to 0.

    Snap(float, float)

    Rounds this float to the nearest multiple of step. Useful for grid snapping, quantizing audio levels, or aligning values to fixed increments. For example, 1.7f.Snap(0.5f) returns 1.5f.

    Declaration
    public static float Snap(this float value, float step)
    Parameters
    Type Name Description
    float value

    The value to be rounded.

    float step

    The step size to which the value will be rounded. Must be greater than 0.

    Returns
    Type Description
    float

    The rounded value, as a multiple of the specified step.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if the step is less than or equal to 0.

    Wrap(int, int, int)

    Wraps this int into the half-open interval [minInclusive, maxExclusive). When the value falls below minInclusive or reaches maxExclusive, it is folded back into range. This is the ranged equivalent of Mod(int, int) and is useful for circular array indexing, sprite frame looping, and menu navigation wrap-around.

    Declaration
    public static int Wrap(this int value, int minInclusive, int maxExclusive)
    Parameters
    Type Name Description
    int value

    The value to be wrapped.

    int minInclusive

    The inclusive lower bound of the interval.

    int maxExclusive

    The exclusive upper bound of the interval.

    Returns
    Type Description
    int

    The wrapped value, constrained within the interval [minInclusive, maxExclusive).

    Exceptions
    Type Condition
    ArgumentException

    Thrown if maxExclusive is less than or equal to minInclusive.

    Wrap(long, long, long)

    Wraps this int into the half-open interval [minInclusive, maxExclusive). When the value falls below minInclusive or reaches maxExclusive, it is folded back into range. This is the ranged equivalent of Mod(int, int) and is useful for circular array indexing, sprite frame looping, and menu navigation wrap-around.

    Declaration
    public static long Wrap(this long value, long minInclusive, long maxExclusive)
    Parameters
    Type Name Description
    long value

    The value to be wrapped.

    long minInclusive

    The inclusive lower bound of the interval.

    long maxExclusive

    The exclusive upper bound of the interval.

    Returns
    Type Description
    long

    The wrapped value, constrained within the interval [minInclusive, maxExclusive).

    Exceptions
    Type Condition
    ArgumentException

    Thrown if maxExclusive is less than or equal to minInclusive.

    Wrap(uint, uint, uint)

    Wraps this int into the half-open interval [minInclusive, maxExclusive). When the value falls below minInclusive or reaches maxExclusive, it is folded back into range. This is the ranged equivalent of Mod(int, int) and is useful for circular array indexing, sprite frame looping, and menu navigation wrap-around.

    Declaration
    public static uint Wrap(this uint value, uint minInclusive, uint maxExclusive)
    Parameters
    Type Name Description
    uint value

    The value to be wrapped.

    uint minInclusive

    The inclusive lower bound of the interval.

    uint maxExclusive

    The exclusive upper bound of the interval.

    Returns
    Type Description
    uint

    The wrapped value, constrained within the interval [minInclusive, maxExclusive).

    Exceptions
    Type Condition
    ArgumentException

    Thrown if maxExclusive is less than or equal to minInclusive.

    Wrap(ulong, ulong, ulong)

    Wraps this int into the half-open interval [minInclusive, maxExclusive). When the value falls below minInclusive or reaches maxExclusive, it is folded back into range. This is the ranged equivalent of Mod(int, int) and is useful for circular array indexing, sprite frame looping, and menu navigation wrap-around.

    Declaration
    public static ulong Wrap(this ulong value, ulong minInclusive, ulong maxExclusive)
    Parameters
    Type Name Description
    ulong value

    The value to be wrapped.

    ulong minInclusive

    The inclusive lower bound of the interval.

    ulong maxExclusive

    The exclusive upper bound of the interval.

    Returns
    Type Description
    ulong

    The wrapped value, constrained within the interval [minInclusive, maxExclusive).

    Exceptions
    Type Condition
    ArgumentException

    Thrown if maxExclusive is less than or equal to minInclusive.

    See Also

    NumberUtil
    In this article
    Back to top Scylla Framework - Core Module API Documentation