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.Struct
Unstable/private API.Layout
struct CompactValue { union { float value; uint32_t repr; }; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CompactValue.Buffer
An array ofCompactValue
structs.
-
Constructor Summary
Constructors Constructor Description CompactValue(java.nio.ByteBuffer container)
Creates aCompactValue
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CompactValue
create(long address)
Returns a newCompactValue
instance for the specified memory address.static CompactValue.Buffer
create(long address, int capacity)
Create aCompactValue.Buffer
instance at the specified memory.static CompactValue
createSafe(long address)
static CompactValue.Buffer
createSafe(long address, int capacity)
float
decode()
YGValue
decode(YGValue __result)
static int
nrepr(long struct)
Unsafe version ofrepr()
.static float
nvalue(long struct)
Unsafe version ofvalue()
.int
repr()
Returns the value of therepr
field.int
sizeof()
float
value()
Returns the value of thevalue
field.
-
-
-
Constructor Detail
-
CompactValue
public CompactValue(java.nio.ByteBuffer container)
Creates aCompactValue
instance at the current position of the specifiedByteBuffer
container. 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:
sizeof
in classorg.lwjgl.system.Struct
-
value
public float value()
Returns the value of thevalue
field.
-
repr
public int repr()
Returns the value of therepr
field.
-
create
public static CompactValue create(long address)
Returns a newCompactValue
instance 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.Buffer
instance 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()
-
-