Class FloatExtensions
- Namespace
- RisingV.Shared.Extensions
- Assembly
- RisingV.Shared.dll
Provides extension methods for working with floating-point numbers and their related operations in the RisingV project.
public static class FloatExtensions
- Inheritance
-
FloatExtensions
- Inherited Members
Methods
CreateWorldItem(float3, PrefabGUID, int)
Creates a world item at the specified position with the given PrefabGUID and amount.
public static void CreateWorldItem(this float3 pos, PrefabGUID guid, int amount)
Parameters
pos
float3The position in the world where the item will be created.
guid
PrefabGUIDThe PrefabGUID of the prefab to create.
amount
intThe amount of the item to create.
CreateWorldItem(float3, int, int)
Creates a world item at the specified position with the given GUID and amount.
public static void CreateWorldItem(this float3 pos, int guid, int amount)
Parameters
pos
float3The position in the world where the item will be created.
guid
intThe GUID of the prefab to create.
amount
intThe amount of the item to create.
SortEntitiesByDistance(float3, NativeArray<Entity>)
Sorts an array of entities by their distance from a given position.
public static NativeArray<Entity> SortEntitiesByDistance(this float3 position, NativeArray<Entity> entities)
Parameters
position
float3The reference position to measure distances from
entities
NativeArray<Entity>The array of entities to sort
Returns
- NativeArray<Entity>
The sorted array of entities