cirq.chosen_angle_to_half_turns
Returns a half_turns value based on the given arguments.
cirq.chosen_angle_to_half_turns(
half_turns: Optional[type_alias.TParamVal] = None,
rads: Optional[float] = None,
degs: Optional[float] = None,
default: float = 1.0
) -> cirq.TParamVal
At most one of half_turns, rads, degs must be specified. If none are
specified, the output defaults to half_turns=1.
Args |
half_turns
|
The number of half turns to rotate by.
|
rads
|
The number of radians to rotate by.
|
degs
|
The number of degrees to rotate by
|
default
|
The half turns angle to use if nothing else is specified.
|
Returns |
A number of half turns.
|
Raises |
ValueError
|
If more than one of half_turn , rads , or degs is given.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-27 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-27 UTC."],[],[]]