Skip to content

Chapter 9.8; Fig 9.12: Wrong order of method arguments for Image.star #75

@Christovis

Description

@Christovis

In the PDF on page 105 in Chapter 9.8 the following code snipped is supposed to generate the stars shown in Fig. 9.12:

val star = Image
    .star(100, 50, 5, 0.degrees)
   [...]

however the order in which the arguments are given seems to be wrong when looking at the source code: https://github.com/creativescala/doodle/blob/79e41e13637592519cf809b0e2b34c5f4958b418/image/shared/src/main/scala/doodle/image/Image.scala#L203

I fixed it thus using the following order to create something like shown in the Fig. 9.12:

val star = Image
    .star(5, 100, 50, 0.degrees)
   [...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions