Package org.lwjgl.util.yoga
Class CompactValue
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.yoga.CompactValue
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class CompactValue extends org.lwjgl.system.StructUnstable/private API.Layout
struct CompactValue { union { float value; uint32_t repr; }; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCompactValue.BufferAn array ofCompactValuestructs.
-
Constructor Summary
Constructors Constructor Description CompactValue(java.nio.ByteBuffer container)Creates aCompactValueinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CompactValuecreate(long address)Returns a newCompactValueinstance for the specified memory address.static CompactValue.Buffercreate(long address, int capacity)Create aCompactValue.Bufferinstance at the specified memory.static CompactValuecreateSafe(long address)static CompactValue.BuffercreateSafe(long address, int capacity)floatdecode()YGValuedecode(YGValue __result)static intnrepr(long struct)Unsafe version ofrepr().static floatnvalue(long struct)Unsafe version ofvalue().intrepr()intsizeof()floatvalue()
-
-
-
Constructor Detail
-
CompactValue
public CompactValue(java.nio.ByteBuffer container)
Creates aCompactValueinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
value
public float value()
- Returns:
- the value of the
valuefield.
-
repr
public int repr()
- Returns:
- the value of the
reprfield.
-
create
public static CompactValue create(long address)
Returns a newCompactValueinstance for the specified memory address.
-
createSafe
@Nullable public static CompactValue createSafe(long address)
-
create
public static CompactValue.Buffer create(long address, int capacity)
Create aCompactValue.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static CompactValue.Buffer createSafe(long address, int capacity)
-
nvalue
public static float nvalue(long struct)
Unsafe version ofvalue().
-
nrepr
public static int nrepr(long struct)
Unsafe version ofrepr().
-
decode
public float decode()
-
-