Skip to content

Instantly share code, notes, and snippets.

@ToJans
Created March 30, 2014 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ToJans/9870054 to your computer and use it in GitHub Desktop.
Save ToJans/9870054 to your computer and use it in GitHub Desktop.
What is the best way to do this in F#?
let povify model =
match model with
| (v:Vector3D<decimal>) -> sprintf "<%M,%M,%M>" (v.x/1M) (v.y/1M) (v.z/1M)
| CubeGeometry c ->
let half = c.size/2M
sprintf "box {%s %s} " (povify half) (povify vec3D0-half)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment