---
title: "init(element:fromPhysicalValue:timestamp:)"
framework: corehid
role: symbol
role_heading: Initializer
path: "corehid/hidelement/value/init(element:fromphysicalvalue:timestamp:)"
---

# init(element:fromPhysicalValue:timestamp:)

Creates a HID element value from a physical value.

## Declaration

```swift
init?<FloatingPointType>(element: HIDElement, fromPhysicalValue: FloatingPointType, timestamp: SuspendingClock.Instant) where FloatingPointType : BinaryFloatingPoint
```

## Parameters

- `element`: The element associated with this value.
- `timestamp`: The time that the value was created.

## Discussion

Discussion The raw value and physical value are calculated; both must be valid.

## See Also

### Create a HID element from a value

- [init(element:fromBytes:timestamp:)](corehid/hidelement/value/init(element:frombytes:timestamp:).md)
- [init(element:fromLogicalValueTruncatingIfNeeded:timestamp:)](corehid/hidelement/value/init(element:fromlogicalvaluetruncatingifneeded:timestamp:).md)
- [init(element:fromIntegerTruncatingIfNeeded:timestamp:)](corehid/hidelement/value/init(element:fromintegertruncatingifneeded:timestamp:).md)
- [element](corehid/hidelement/value/element.md)
