Learn R Programming

see (version 0.10.0)

golden_ratio: Golden Ratio

Description

Returns the golden ratio (1.618034...). Useful to easily obtain golden proportions, for instance for a horizontal figure, if you want its height to be 8, you can set its width to be golden_ratio(8).

Usage

golden_ratio(x = 1)

Arguments

x

A number to be multiplied by the golden ratio. The default (x = 1) returns the value of the golden ratio.

Examples

Run this code
golden_ratio()
golden_ratio(10)

Run the code above in your browser using DataLab